diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-01-04 06:21:42 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-01-04 06:21:42 +0000 |
commit | f2cf027883b5bf0aaa92eec72818118ab73bc2dc (patch) | |
tree | 070ddaa0d2c041e2ead77541f63ab1d52d886986 /lib/class/update.class.php | |
parent | 1068c367ac5ee03fc799773289786863689da5bd (diff) | |
download | ampache-f2cf027883b5bf0aaa92eec72818118ab73bc2dc.tar.gz ampache-f2cf027883b5bf0aaa92eec72818118ab73bc2dc.tar.bz2 ampache-f2cf027883b5bf0aaa92eec72818118ab73bc2dc.zip |
last db update of 3.3.3 branch adds german prefixes to the album/artist tables and removes time zone preference
Diffstat (limited to 'lib/class/update.class.php')
-rw-r--r-- | lib/class/update.class.php | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/lib/class/update.class.php b/lib/class/update.class.php index 9dd0d5a7..8ea8a615 100644 --- a/lib/class/update.class.php +++ b/lib/class/update.class.php @@ -340,6 +340,11 @@ class Update { $version[] = array('version' => '333003','description' => $update_string); + $update_string = '- Removed Time Zone Preference that never should have been added.<br />' . + '- Added German Prefixes to Album.Prefix and Artist.Prefix.<br />'; + + $version[] = array('version' => '333004','description' => $update_string); + return $version; } // populate_version @@ -2139,5 +2144,36 @@ class Update { } // update_333003 + /** + * update_333004 + * This removes the TIME preference which I never should have added + * and adds the German prefixes to the album table + */ + function update_333004() { + + $sql = "DELETE FROM preferences WHERE `name`='time_zone'"; + $db_results = mysql_query($sql,dbh()); + + $sql = "ALTER TABLE `album` CHANGE `prefix` `prefix` ENUM('The','An','A','Der','Die','Das','Ein','Eine') NULL"; + $db_results = mysql_query($sql, dbh()); + + $sql = "ALTER TABLE `artist` CHANGE `prefix` `prefix` ENUM('The','An','A','Der','Die','Das','Ein','Eine') NULL"; + $db_results = mysql_query($sql,dbh()); + + /* Fix all preferences */ + $sql = "SELECT * FROM user"; + $db_results = mysql_query($sql,dbh()); + + $user = new User(); + $user->fix_preferences('-1'); + + while ($r = mysql_fetch_assoc($db_results)) { + $user->fix_preferences($r['username']); + } // while results + + $this->set_version('db_version','333004'); + + } // update_333004 + } // end update class ?> |