summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2017-07-03 23:28:10 +0100
committerGreg Roach <fisharebest@gmail.com>2017-07-03 23:28:10 +0100
commitba74d7cc5634af48f0ead68f67f6ba2f64b3ac98 (patch)
tree109b8109513bac8008719dcc6053ee404048f6e0
parent566a4fbb2ef3a9745fd7bbeb9af015e66daf9970 (diff)
downloadwebtrees-ba74d7cc5634af48f0ead68f67f6ba2f64b3ac98.tar.gz
webtrees-ba74d7cc5634af48f0ead68f67f6ba2f64b3ac98.tar.bz2
webtrees-ba74d7cc5634af48f0ead68f67f6ba2f64b3ac98.zip
Working on media list
-rw-r--r--medialist.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/medialist.php b/medialist.php
index 9319acf1cd..1c950a8f36 100644
--- a/medialist.php
+++ b/medialist.php
@@ -182,18 +182,18 @@ if ($action === 'submit') {
<p class="card-text">
<?php
// Show file details
+ $mediatype = $media->getMediaType();
+ if ($mediatype) {
+ echo GedcomTag::getLabelValue('TYPE', GedcomTag::getFileFormTypeValue($mediatype));
+ }
if ($media->isExternal()) {
echo GedcomTag::getLabelValue('URL', $media->getFilename());
} else {
if ($media->fileExists()) {
- if (Auth::isEditor($WT_TREE)) {
- echo GedcomTag::getLabelValue('FILE', $media->getFilename());
- $mediatype = $media->getMediaType();
- if ($mediatype) {
- echo GedcomTag::getLabelValue('TYPE', GedcomTag::getFileFormTypeValue($mediatype));
- }
- }
if ($details === '1') {
+ if (Auth::isEditor($WT_TREE)) {
+ echo GedcomTag::getLabelValue('FILE', $media->getFilename());
+ }
echo GedcomTag::getLabelValue('FORM', $media->mimeType());
echo GedcomTag::getLabelValue('__FILE_SIZE__', $media->getFilesize());
$imgsize = $media->getImageAttributes();