summaryrefslogtreecommitdiffstats
path: root/lib/preferences.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-12-05 04:43:13 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-12-05 04:43:13 +0000
commitca34aa1edeb011baed4e2a6fabe56d90c0ba314d (patch)
tree19ef4bdd32a97f1effc6e50d2e06dba74fb398ba /lib/preferences.php
parentafe3b2fcb0183426c34620dfe2d68ed41f84d1d9 (diff)
downloadampache-ca34aa1edeb011baed4e2a6fabe56d90c0ba314d.tar.gz
ampache-ca34aa1edeb011baed4e2a6fabe56d90c0ba314d.tar.bz2
ampache-ca34aa1edeb011baed4e2a6fabe56d90c0ba314d.zip
* 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
Diffstat (limited to 'lib/preferences.php')
-rw-r--r--lib/preferences.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/preferences.php b/lib/preferences.php
index ac18479c..6d1d5a5a 100644
--- a/lib/preferences.php
+++ b/lib/preferences.php
@@ -368,6 +368,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
* preferences table this is used by the modules