summaryrefslogtreecommitdiffstats
path: root/lib/class/album.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-03-06 04:55:19 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-03-06 04:55:19 +0000
commit84b483c99a32452dc53b9b77fdf818c710bcd5d3 (patch)
tree62aa6939acb5434bb530d327f78ba3329b146fb7 /lib/class/album.class.php
parent2c337852cff31297d681fb87d3098cc3d9041101 (diff)
downloadampache-84b483c99a32452dc53b9b77fdf818c710bcd5d3.tar.gz
ampache-84b483c99a32452dc53b9b77fdf818c710bcd5d3.tar.bz2
ampache-84b483c99a32452dc53b9b77fdf818c710bcd5d3.zip
fixed playlist update on full strict of mysql5.x and jpg mime type
Diffstat (limited to 'lib/class/album.class.php')
-rw-r--r--lib/class/album.class.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/class/album.class.php b/lib/class/album.class.php
index a4c9601b..c74bd800 100644
--- a/lib/class/album.class.php
+++ b/lib/class/album.class.php
@@ -453,6 +453,8 @@ class Album {
/* If it's an image file */
if ($extension == "jpg" || $extension == "gif" || $extension == "png" || $extension == "jp2") {
+ if ($extension == 'jpg') { $extension = 'jpeg'; }
+
// HACK ALERT this is to prevent duplicate filenames
$full_filename = $dir . '/' . $file;
$index = md5($full_filename);
@@ -633,7 +635,7 @@ class Album {
// Rudimentary image type detection, only JPG and GIF allowed.
if (substr($result[$key], -4 == '.jpg')) {
- $mime = "image/jpg";
+ $mime = "image/jpeg";
}
elseif (substr($result[$key], -4 == '.gif')) {
$mime = "image/gif";
@@ -763,7 +765,7 @@ class Album {
} // if we have PHP:GD
// Default to image/jpg as a guess if there is no passed mime type
- $mime = $mime ? $mime : 'image/jpg';
+ $mime = $mime ? $mime : 'image/jpeg';
// Push the image into the database
$sql = "REPLACE INTO `album_data` SET `art` = '" . Dba::escape($image) . "'," .