diff options
Diffstat (limited to 'lib/class')
-rw-r--r-- | lib/class/album.class.php | 6 | ||||
-rw-r--r-- | lib/class/update.class.php | 11 | ||||
-rw-r--r-- | lib/class/user.class.php | 2 |
3 files changed, 11 insertions, 8 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) . "'," . diff --git a/lib/class/update.class.php b/lib/class/update.class.php index 9e902d52..66322cd7 100644 --- a/lib/class/update.class.php +++ b/lib/class/update.class.php @@ -259,10 +259,9 @@ class Update { $version[] = array('version' => '340014','description'=>$update_string); $update_string = '- Alter Playlist Date Field to fix issues with some MySQL configurations.<br />' . - '- Add Index to Album_Data to improve album art random performance.<br />' . '- Alter Rating type to correct AVG issue on searching.<br />'; - //$version[] = array('version' => '340015','description'=>$update_string); + $version[] = array('version' => '340015','description'=>$update_string); return $version; @@ -1132,15 +1131,15 @@ class Update { */ public static function update_340015() { - $sql = "ALTER TABLE `playlist` CHANGE `date` `date` INT ( 11 ) UNSIGNED NOT NULL"; + $sql = "ALTER TABLE `playlist` DROP `date`"; + $db_results = Dba::query($sql); + + $sql = "ALTER TABLE `playlist` ADD `date` INT ( 11 ) UNSIGNED NOT NULL"; $db_results = Dba::query($sql); $sql = "ALTER TABLE `rating` CHANGE `rating` TINYINT ( 4 ) NOT NULL"; $db_results = Dba::query($sql); -// $sql = "ALTER TABLE `user` CHANGE `validation` VARCHAR ( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL"; -// $db_results = Dba::query($sql); - self::set_version('db_version','340015'); } // update_340015 diff --git a/lib/class/user.class.php b/lib/class/user.class.php index 817f81ba..ad5c20f3 100644 --- a/lib/class/user.class.php +++ b/lib/class/user.class.php @@ -522,6 +522,8 @@ class User { return false; } + $this->set_preferences(); + // Check if lastfm is loaded, if so run the update if (Plugin::is_installed('Last.FM')) { $lastfm = new Plugin('Lastfm'); |