aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/images/daily_stats.img.php2
-rw-r--r--admin/images/global_stats.img.php2
-rw-r--r--admin/images/monthly_stats.img.php2
-rw-r--r--admin/thumbnail.php2
-rw-r--r--include/config_default.inc.php6
-rw-r--r--tools/create_listing_file.php6
6 files changed, 12 insertions, 8 deletions
diff --git a/admin/images/daily_stats.img.php b/admin/images/daily_stats.img.php
index 89a28e000..e5d320e86 100644
--- a/admin/images/daily_stats.img.php
+++ b/admin/images/daily_stats.img.php
@@ -116,7 +116,7 @@ if ($outputFormat == "png")
header("Content-type: image/png");
ImagePNG($image);
}
-else if ($outputFormat == "jpg")
+else if (in_array($outputFormat, array("jpg", "jpeg")))
{
header("Content-type: image/jpeg");
Imagejpeg($image);
diff --git a/admin/images/global_stats.img.php b/admin/images/global_stats.img.php
index 99124f939..557067e42 100644
--- a/admin/images/global_stats.img.php
+++ b/admin/images/global_stats.img.php
@@ -116,7 +116,7 @@ if ($outputFormat == "png")
header("Content-type: image/png");
ImagePNG($image);
}
-else if ($outputFormat == "jpg")
+else if (in_array($outputFormat, array("jpg", "jpeg")))
{
header("Content-type: image/jpeg");
Imagejpeg($image);
diff --git a/admin/images/monthly_stats.img.php b/admin/images/monthly_stats.img.php
index 3a3c0e143..5ad3b0f55 100644
--- a/admin/images/monthly_stats.img.php
+++ b/admin/images/monthly_stats.img.php
@@ -116,7 +116,7 @@ if ($outputFormat == "png")
header("Content-type: image/png");
ImagePNG($image);
}
-else if ($outputFormat == "jpg")
+else if (in_array($outputFormat, array("jpg", "jpeg")))
{
header("Content-type: image/jpeg");
Imagejpeg($image);
diff --git a/admin/thumbnail.php b/admin/thumbnail.php
index 594125a84..543b589cc 100644
--- a/admin/thumbnail.php
+++ b/admin/thumbnail.php
@@ -51,7 +51,7 @@ function RatioResizeImg($path, $newWidth, $newHeight, $tn_ext)
// extension of the picture filename
$extension = get_extension($filename);
- if ($extension == 'jpg' or $extension == 'JPG')
+ if (in_array($extension, array('jpg', 'JPG', 'jpeg', 'JPEG')))
{
$srcImage = @imagecreatefromjpeg($path);
}
diff --git a/include/config_default.inc.php b/include/config_default.inc.php
index a8a439a9c..78d443636 100644
--- a/include/config_default.inc.php
+++ b/include/config_default.inc.php
@@ -72,12 +72,14 @@ $conf['order_by'] = ' ORDER BY date_available DESC, file ASC, id ASC';
$conf['slideshow_period'] = 4;
// file_ext : file extensions (case sensitive) authorized
-$conf['file_ext'] = array('jpg','JPG','png','PNG','gif','GIF','mpg','zip',
+$conf['file_ext'] = array('jpg','JPG','jpeg','JPEG',
+ 'png','PNG','gif','GIF','mpg','zip',
'avi','mp3','ogg');
// picture_ext : file extensions for picture file, must be a subset of
// file_ext
-$conf['picture_ext'] = array('jpg','JPG','png','PNG','gif','GIF');
+$conf['picture_ext'] = array('jpg','JPG','jpeg','JPEG',
+ 'png','PNG','gif','GIF');
// top_number : number of element to display for "best rated" and "most
// visited" categories
diff --git a/tools/create_listing_file.php b/tools/create_listing_file.php
index 5adbf745e..47632010c 100644
--- a/tools/create_listing_file.php
+++ b/tools/create_listing_file.php
@@ -34,11 +34,13 @@ $conf['prefix_thumbnail'] = 'TN-';
// $conf['file_ext'] lists all extensions (case insensitive) allowed for
// your PhpWebGallery installation
-$conf['file_ext'] = array('jpg','JPG','png','PNG','gif','GIF','mpg','zip',
+$conf['file_ext'] = array('jpg','JPG','jpeg','JPEG',
+ 'png','PNG','gif','GIF','mpg','zip',
'avi','mp3','ogg');
// $conf['picture_ext'] must be a subset of $conf['file_ext']
-$conf['picture_ext'] = array('jpg','JPG','png','PNG','gif','GIF');
+$conf['picture_ext'] = array('jpg','JPG','jpeg','JPEG',
+ 'png','PNG','gif','GIF');
// $conf['version'] is used to verify the compatibility of the generated
// listing.xml file and the PhpWebGallery version you're running