1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 06:38:00 +02:00

Issue #619 - Media Manager icons.

This commit is contained in:
Cameron
2015-02-22 17:20:11 -08:00
parent 45ca6af482
commit bd4372066f

View File

@@ -3180,11 +3180,13 @@ class e_form
return $video; return $video;
} }
$fileOnly = basename($value);
// Not an image but a file. (media manager) // Not an image but a file. (media manager)
if(!preg_match("/[a-zA-z0-9_-\s\(\)]+\.(png|jpg|jpeg|gif|PNG|JPG|JPEG|GIF)$/",$value) && strpos($value,'.')!==false) if(!preg_match("/\.(png|jpg|jpeg|gif|PNG|JPG|JPEG|GIF)$/", $fileOnly) && false !== strpos($fileOnly,'.'))
{ {
$icon = "{e_IMAGE}filemanager/zip_32.png"; $icon = "{e_IMAGE}filemanager/zip_32.png";
$src = $tp->replaceConstants(vartrue($parms['pre']).$icon, 'abs'); $src = $tp->replaceConstants(vartrue($parms['pre']).$icon, 'abs');
// return $value;
return e107::getParser()->toGlyph('fa-file','size=2x'); return e107::getParser()->toGlyph('fa-file','size=2x');
// return '<img src="'.$src.'" alt="'.$value.'" class="e-thumb" title="'.$value.'" />'; // return '<img src="'.$src.'" alt="'.$value.'" class="e-thumb" title="'.$value.'" />';
} }