fixes #302, file extension case insensitive for sync

if $conf['picture_ext'] contains "jpg", Piwigo sync will accept {jpg,JPG,Jpg,jPg,jpG,...}
This commit is contained in:
plegall
2017-04-07 15:25:10 +02:00
parent 1c5b36f734
commit d58a24c882
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -54,7 +54,7 @@ final class SrcImage
global $conf;
$this->id = $infos['id'];
$ext = get_extension($infos['path']);
$ext = strtolower(get_extension($infos['path']));
if (in_array($ext, $conf['picture_ext']))
{
$this->rel_path = $infos['path'];
@@ -66,7 +66,6 @@ final class SrcImage
}
else
{
$ext = strtolower($ext);
$this->rel_path = trigger_change('get_mimetype_location', get_themeconf('mime_icon_dir').$ext.'.png', $ext );
$this->flags |= self::IS_MIMETYPE;
if ( ($size=@getimagesize(PHPWG_ROOT_PATH.$this->rel_path)) === false)