From 84b483c99a32452dc53b9b77fdf818c710bcd5d3 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Thu, 6 Mar 2008 04:55:19 +0000 Subject: fixed playlist update on full strict of mysql5.x and jpg mime type --- docs/CHANGELOG | 3 +++ image.php | 2 +- lib/class/album.class.php | 6 ++++-- lib/class/update.class.php | 11 +++++------ lib/class/user.class.php | 2 ++ lib/init.php | 1 - server/playlist.ajax.php | 1 + util.php | 1 - 8 files changed, 16 insertions(+), 11 deletions(-) diff --git a/docs/CHANGELOG b/docs/CHANGELOG index 57ebdd43..00f91a9b 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,9 @@ -------------------------------------------------------------------------- v.3.4-Beta2 + - DB Update, fixes the playlist create issue with full strict on + MySQL 5.x + - Corrected mime type for JPG (Thx CoF) - Added Catalog Last Update and Last Add times to API Handshake. - Fixed Remember Me Cookie so it's actually set - Removed some invalid queries that were not needed, tweaked logic diff --git a/image.php b/image.php index 1120329d..55444ee4 100644 --- a/image.php +++ b/image.php @@ -1,7 +1,7 @@ '340014','description'=>$update_string); $update_string = '- Alter Playlist Date Field to fix issues with some MySQL configurations.
' . - '- Add Index to Album_Data to improve album art random performance.
' . '- Alter Rating type to correct AVG issue on searching.
'; - //$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'); diff --git a/lib/init.php b/lib/init.php index f63c3add..5fe7448e 100644 --- a/lib/init.php +++ b/lib/init.php @@ -144,7 +144,6 @@ require_once $prefix . '/modules/infotools/openstrands.class.php'; $results = Preference::fix_preferences($results); Config::set_by_array($results,1); -debug_event('ZZWANG IS',$wang,'1'); // Modules (These are conditionaly included depending upon config values) if (Config::get('ratings')) { diff --git a/server/playlist.ajax.php b/server/playlist.ajax.php index f5904bd6..bfd32967 100644 --- a/server/playlist.ajax.php +++ b/server/playlist.ajax.php @@ -50,6 +50,7 @@ switch ($_REQUEST['action']) { // generate the new playlist $playlist_id = Playlist::create($name,'public'); + if (!$playlist_id) { break; } $playlist = new Playlist($playlist_id); // Itterate through and add them to our new playlist diff --git a/util.php b/util.php index 2066babe..28bbabaf 100644 --- a/util.php +++ b/util.php @@ -18,7 +18,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -$wang = 'util'; require_once 'lib/init.php'; header("Expires: Tuesday, 27 Mar 1984 05:00:00 GMT"); -- cgit