From f4ad61dccfd3b92760659f0382ca51a14e92a8b8 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Sun, 9 Sep 2007 05:41:26 +0000 Subject: - Fixed missing web_path on catalog functions - New Localplay Controller Abstract class, required for controllers - Tweaked preferences as needed for localplay mojo --- lib/class/preference.class.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'lib/class/preference.class.php') 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 @@ -127,6 +127,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 -- cgit