summaryrefslogtreecommitdiffstats
path: root/lib/class/update.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-02-28 19:27:37 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-02-28 19:27:37 +0000
commitf9e3b1360f40ada7645d6fdd0be6ee6c721269a0 (patch)
tree3c9e1d5bc87fb84a87a06acc428d889c6a52da2b /lib/class/update.class.php
parent2b49c1dfc894b77272128de9ea80f8f055d4bd47 (diff)
downloadampache-f9e3b1360f40ada7645d6fdd0be6ee6c721269a0.tar.gz
ampache-f9e3b1360f40ada7645d6fdd0be6ee6c721269a0.tar.bz2
ampache-f9e3b1360f40ada7645d6fdd0be6ee6c721269a0.zip
fixed playlist permission issue for users
Diffstat (limited to 'lib/class/update.class.php')
-rw-r--r--lib/class/update.class.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/class/update.class.php b/lib/class/update.class.php
index daf5c300..bb93a9e5 100644
--- a/lib/class/update.class.php
+++ b/lib/class/update.class.php
@@ -355,6 +355,8 @@ class Update {
$version[] = array('version' => '340001','description' => $update_string);
+ $update_string = '- Added Offset Limit to Preferences and removed from user table';
+
return $version;
} // populate_version
@@ -2416,5 +2418,35 @@ class Update {
} //update_340001
+ /**
+ * update_340002
+ * This update tweaks the preferences a little more and make sure that the
+ * min_object_count has a rational value
+ */
+ function update_340002() {
+
+ /* Add the offset_limit preference and remove it from the user table */
+ $sql = "INSERT INTO `preferences` (`name`,`value`,`description`,`level`,`type`,`catagory`) " .
+ "VALUES ('offset_limit','50','Offset Limit','5','integer','interface')";
+ $db_results = mysql_query($sql,dbh());
+
+
+ // Fix the preferences for everyone
+ $sql = "SELECT `id` 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['id']);
+ }
+
+ $this->set_version('db_version','340002');
+
+ return true;
+
+ } // update_340002
+
} // end update class
?>