mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
Merge branch 'feature/302-file_ext-case-insensitive'
This commit is contained in:
@@ -90,7 +90,7 @@ function get_elements($path)
|
||||
|
||||
if (is_file($path.'/'.$node))
|
||||
{
|
||||
$extension = get_extension($node);
|
||||
$extension = strtolower(get_extension($node));
|
||||
$filename_wo_ext = get_filename_wo_extension($node);
|
||||
|
||||
if ( isset($conf['flip_file_ext'][$extension]) )
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
// picture_ext : file extensions for picture file, must be a subset of
|
||||
// file_ext
|
||||
$conf['picture_ext'] = array('jpg','JPG','jpeg','JPEG','png','PNG','gif','GIF');
|
||||
$conf['picture_ext'] = array('jpg','jpeg','png','gif');
|
||||
|
||||
// file_ext : file extensions (case sensitive) authorized
|
||||
$conf['file_ext'] = array_merge(
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user