Skip to content

Commit

Permalink
Fixed Issue ID 0000593: *.jpeg support in PWG
Browse files Browse the repository at this point in the history
git-svn-id: http://piwigo.org/svn/trunk@1635 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
rub committed Dec 4, 2006
1 parent 7638575 commit af138fa
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion admin/images/daily_stats.img.php
Expand Up @@ -116,7 +116,7 @@
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);
Expand Down
2 changes: 1 addition & 1 deletion admin/images/global_stats.img.php
Expand Up @@ -116,7 +116,7 @@
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);
Expand Down
2 changes: 1 addition & 1 deletion admin/images/monthly_stats.img.php
Expand Up @@ -116,7 +116,7 @@
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);
Expand Down
2 changes: 1 addition & 1 deletion admin/thumbnail.php
Expand Up @@ -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);
}
Expand Down
6 changes: 4 additions & 2 deletions include/config_default.inc.php
Expand Up @@ -72,12 +72,14 @@
$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
Expand Down
6 changes: 4 additions & 2 deletions tools/create_listing_file.php
Expand Up @@ -34,11 +34,13 @@

// $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
Expand Down

0 comments on commit af138fa

Please sign in to comment.