summaryrefslogtreecommitdiffstats
path: root/lib/class/preference.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-09-09 05:41:26 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-09-09 05:41:26 +0000
commitf4ad61dccfd3b92760659f0382ca51a14e92a8b8 (patch)
tree3b7b5743a7d75e14c28fcccf96391c42b674e00c /lib/class/preference.class.php
parent83815169ceb211d4449928b21c02539795f81624 (diff)
downloadampache-f4ad61dccfd3b92760659f0382ca51a14e92a8b8.tar.gz
ampache-f4ad61dccfd3b92760659f0382ca51a14e92a8b8.tar.bz2
ampache-f4ad61dccfd3b92760659f0382ca51a14e92a8b8.zip
- Fixed missing web_path on catalog functions
- New Localplay Controller Abstract class, required for controllers - Tweaked preferences as needed for localplay mojo
Diffstat (limited to 'lib/class/preference.class.php')
-rw-r--r--lib/class/preference.class.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/class/preference.class.php b/lib/class/preference.class.php
index 578302ff..6fb707fe 100644
--- a/lib/class/preference.class.php
+++ b/lib/class/preference.class.php
@@ -128,6 +128,29 @@ class Preference {
} // name_from_id
/**
+ * get_catagories
+ * This returns an array of the names of the different possible sections
+ * it ignores the 'internal' catagory
+ */
+ public static function get_catagories() {
+
+ $sql = "SELECT `preference`.`catagory` FROM `preference` GROUP BY `catagory` ORDER BY `catagory`";
+ $db_results = Dba::query($sql);
+
+ $results = array();
+
+ while ($row = Dba::fetch_assoc($db_results)) {
+ if ($row['catagory'] != 'internal') {
+ $results[] = $row['catagory'];
+ }
+ } // end while
+
+ return $results;
+
+ } // get_catagories
+
+
+ /**
* insert
* This inserts a new preference into the preference table
* it does NOT sync up the users, that should be done independtly