diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-05-13 00:39:40 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-05-13 00:39:40 +0000 |
commit | a4be3297d541560e1bc4291d366808fca517d49e (patch) | |
tree | f2dd6cc96d2e28042845d7b532d19cc3c1295e9e /lib/ui.lib.php | |
parent | 7049a9976a25e95cb1ee68a84a853211ccc3db8a (diff) | |
download | ampache-a4be3297d541560e1bc4291d366808fca517d49e.tar.gz ampache-a4be3297d541560e1bc4291d366808fca517d49e.tar.bz2 ampache-a4be3297d541560e1bc4291d366808fca517d49e.zip |
fixed localplay buttons with use_auth disabled and tweaked access control mojo to prevent login in addition to the normal prevention of streaming
Diffstat (limited to 'lib/ui.lib.php')
-rw-r--r-- | lib/ui.lib.php | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/lib/ui.lib.php b/lib/ui.lib.php index ec5a1b28..e1f3c663 100644 --- a/lib/ui.lib.php +++ b/lib/ui.lib.php @@ -50,51 +50,6 @@ function show_confirmation($title,$text,$next_url,$cancel=0) { } // show_confirmation /** - * init_preferences - * Third times the charm, why rename a function once when you can do it three times :( - * This grabs the preferences and then loads them into conf it should be run on page load - * to initialize the needed variables - */ -function init_preferences() { - - - /* Get Global Preferences */ - $sql = "SELECT preferences.name,user_preference.value FROM preferences,user_preference WHERE user_preference.user='-1' " . - " AND user_preference.preference = preferences.id AND preferences.catagory='system'"; - $db_results = mysql_query($sql, dbh()); - - while ($r = mysql_fetch_assoc($db_results)) { - $name = $r['name']; - $results[$name] = $r['value']; - } // end while sys prefs - - /* Now we need to allow the user to override some stuff that's been set by the above */ - $user_id = '-1'; - if ($GLOBALS['user']->username) { - $user_id = sql_escape($GLOBALS['user']->id); - } - - $sql = "SELECT preferences.name,user_preference.value FROM preferences,user_preference WHERE user_preference.user='$user_id' " . - " AND user_preference.preference = preferences.id AND preferences.catagory != 'system'"; - $db_results = mysql_query($sql, dbh()); - - while ($r = mysql_fetch_assoc($db_results)) { - $name = $r['name']; - $results[$name] = $r['value']; - } // end while - - /* Set the Theme mojo */ - if (strlen($results['theme_name']) > 0) { - $results['theme_path'] = '/themes/' . $results['theme_name']; - } - - conf($results,1); - - return true; - -} // init_preferences - -/** * flip_class * takes an array of 2 class names * and flips them back and forth and |