1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-18 20:31:41 +02:00

Related to issue #619. Attempt to detect and add file extension when it's missing and prior to media import.

This commit is contained in:
Cameron
2014-06-11 20:43:12 -07:00
parent d2b2af639c
commit d6c8f92efa
3 changed files with 84 additions and 11 deletions

View File

@@ -2809,11 +2809,11 @@ class e_form
return $video;
}
if(!preg_match("/[a-zA-z0-9_-\s\(\)]+\.(png|jpg|jpeg|gif|PNG|JPG|JPEG|GIF)$/",$value))
if(!preg_match("/[a-zA-z0-9_-\s\(\)]+\.(png|jpg|jpeg|gif|PNG|JPG|JPEG|GIF)$/",$value) && strpos($value,'.')!==false)
{
$icon = "{e_IMAGE}filemanager/zip_32.png";
$src = $tp->replaceConstants(vartrue($parms['pre']).$icon, 'abs');
return '<img src="'.$src.'" alt="'.$value.'" class="e-thumb" title="'.$value.'" />';
// return '<img src="'.$src.'" alt="'.$value.'" class="e-thumb" title="'.$value.'" />';
}
if(vartrue($parms['thumb']))