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:
@@ -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']))
|
||||
|
Reference in New Issue
Block a user