From ca34aa1edeb011baed4e2a6fabe56d90c0ba314d Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Tue, 5 Dec 2006 04:43:13 +0000 Subject: * Prevent Album art set on demo because people put porn in there :( * Fix Push functionality for the Democratic view stuff * Add footer div definition per Apex's request * Fix Config display with multi-value elements * Added plugin checking to update.php wq --- lib/preferences.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'lib/preferences.php') diff --git a/lib/preferences.php b/lib/preferences.php index ac18479c..6d1d5a5a 100644 --- a/lib/preferences.php +++ b/lib/preferences.php @@ -367,6 +367,24 @@ function get_preference_id($name) { } // get_preference_id +/** + * get_preference_name + * This does the inverse of the above function and returns the preference name from the ID + * This is usefull for doing... the opposite of above. Amazing isn't it. + */ +function get_preference_name($id) { + + $id = sql_escape($id); + + $sql = "SELECT name FROM preferences WHERE id='$id'"; + $db_results = mysql_query($sql,dbh()); + + $results = mysql_fetch_assoc($db_results); + + return $results['name']; + +} // get_preference_name + /** * insert_preference * This creates a new preference record in the -- cgit