1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-26 23:42:52 +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

@ -3179,12 +3179,14 @@ class e_form
{
return $video;
}
$fileOnly = basename($value);
// 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";
$src = $tp->replaceConstants(vartrue($parms['pre']).$icon, 'abs');
// return $value;
return e107::getParser()->toGlyph('fa-file','size=2x');
// return '<img src="'.$src.'" alt="'.$value.'" class="e-thumb" title="'.$value.'" />';
}