summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-09-13 14:43:35 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-09-13 14:43:35 +0000
commitb469b70195a92f7087d3b9c15bbc10797e0411a7 (patch)
tree9c9c170ccf26a437d26093fb28763c1b9cfee82c /lib
parentdbdc2a615805da9a4728e8fbadc9364d8972973e (diff)
downloadampache-b469b70195a92f7087d3b9c15bbc10797e0411a7.tar.gz
ampache-b469b70195a92f7087d3b9c15bbc10797e0411a7.tar.bz2
ampache-b469b70195a92f7087d3b9c15bbc10797e0411a7.zip
added min album size
Diffstat (limited to 'lib')
-rw-r--r--lib/class/update.class.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/class/update.class.php b/lib/class/update.class.php
index a8da5062..e8de0190 100644
--- a/lib/class/update.class.php
+++ b/lib/class/update.class.php
@@ -276,6 +276,11 @@ class Update {
$version[] = array('version' => '332010','description' => $update_string);
+ $update_string = '- Add Min album size to preferences.';
+
+ $version[] = array('version' => '332011','description' => $update_string);
+
+
return $version;
} // populate_version
@@ -1600,5 +1605,30 @@ class Update {
} // update_332010
+ /**
+ * update_332011
+ * Add min album size pref
+ */
+ function update_332011() {
+ /* Inser the new Localplay Controller */
+ $sql = "INSERT INTO preferences (`name`,`value`,`description`,`level`,`type`,`catagory`) " .
+ " VALUES ('min_album_size','0','Min Album Size','0','integer','interface')";
+ $db_results = mysql_query($sql, dbh());
+
+ /* Fix every users 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','332011');
+
+ } // update_332011
+
} // end update class
?>