summaryrefslogtreecommitdiffstats
path: root/lib/class/update.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-06-17 23:59:04 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-06-17 23:59:04 +0000
commit56c960c34a17746beeec455fc225428360d5d91d (patch)
tree85fae55dbb16f1c42109b85549f3853fd270ba7f /lib/class/update.class.php
parentb032ac027e531b992a62b1af5d19e865e28e8b7d (diff)
downloadampache-56c960c34a17746beeec455fc225428360d5d91d.tar.gz
ampache-56c960c34a17746beeec455fc225428360d5d91d.tar.bz2
ampache-56c960c34a17746beeec455fc225428360d5d91d.zip
fixed some issues with the installer, and also made it so that you can delete/disable users again
Diffstat (limited to 'lib/class/update.class.php')
-rw-r--r--lib/class/update.class.php45
1 files changed, 22 insertions, 23 deletions
diff --git a/lib/class/update.class.php b/lib/class/update.class.php
index 85f2938c..e6328838 100644
--- a/lib/class/update.class.php
+++ b/lib/class/update.class.php
@@ -19,22 +19,21 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-/*!
- @header Update Class
- @discussion this class handles updating from one version of
- maintain to the next. Versions are a 6 digit number
- 220000
- ^
- Major Revision
-
- 220000
- ^
- Minor Revision
-
- The last 4 digits are a build number...
- If Minor can't go over 9 Major can go as high as we want
-*/
-
+/**
+ * Update Class
+ * this class handles updating from one version of
+ * maintain to the next. Versions are a 6 digit number
+ * 220000
+ * ^
+ * Major Revision
+ *
+ * 220000
+ * ^
+ * Minor Revision
+ *
+ * The last 4 digits are a build number...
+ * If Minor can't go over 9 Major can go as high as we want
+ */
class Update {
public $key;
@@ -62,7 +61,7 @@ class Update {
*/
private function _get_info() {
- $sql = "SELECT * FROM update_info WHERE key='$this->key'";
+ $sql = "SELECT * FROM `update_info` WHERE `key`='$this->key'";
$db_results = Dba::query($sql);
return Dba::fetch_assoc($db_results);
@@ -589,13 +588,13 @@ class Update {
$insert_results = Dba::query($sql);
} // end while
- $sql = "RENAME TABLE `ampache`.`song_ext_data` TO `ampache`.`song_data`";
+ $sql = "RENAME TABLE `song_ext_data` TO `song_data`";
$db_results = Dba::query($sql);
- $sql = "RENAME TABLE `ampache`.`preferences` TO `ampache`.`preference`";
+ $sql = "RENAME TABLE `preferences` TO `preference`";
$db_results = Dba::query($sql);
- $sql = "RENAME TABLE `ampache`.`ratings` TO `ampache`.`rating`";
+ $sql = "RENAME TABLE `ratings` TO `rating`";
$db_results = Dba::query($sql);
// Go ahead and drop the art/thumb stuff
@@ -610,16 +609,16 @@ class Update {
$sql = "ALTER TABLE `user` DROP `offset_limit`";
$db_results = Dba::query($sql);
- $sql = "ALTER TABLE `ratings` CHANGE `user_rating` `rating` ENUM( '-1', '0', '1', '2', '3', '4', '5' ) NOT NULL DEFAULT '0'";
+ $sql = "ALTER TABLE `rating` CHANGE `user_rating` `rating` ENUM( '-1', '0', '1', '2', '3', '4', '5' ) NOT NULL DEFAULT '0'";
$db_results = Dba::query($sql);
/* Add the rate_limit preference */
- $sql = "INSERT INTO `preferences` (`name`,`value`,`description`,`level`,`type`,`catagory`) " .
+ $sql = "INSERT INTO `preference` (`name`,`value`,`description`,`level`,`type`,`catagory`) " .
"VALUES ('rate_limit','8192','Rate Limit','100','integer','streaming')";
$db_results = Dba::query($sql);
/* Add the playlist_method preference and remove it from the user table */
- $sql = "INSERT INTO `preferences` (`name`,`value`,`description`,`level`,`type`,`catagory`) " .
+ $sql = "INSERT INTO `preference` (`name`,`value`,`description`,`level`,`type`,`catagory`) " .
"VALUES ('playlist_method','50','Playlist Method','5','string','streaming')";
$db_results = Dba::query($sql);