summaryrefslogtreecommitdiffstats
path: root/lib/themes.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-12-25 10:04:27 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-12-25 10:04:27 +0000
commit27158141ee1a14b7d23ae8997d2c41b49fc904d9 (patch)
tree2180fff67d21ffdbab32f2105cff3c7275b6b511 /lib/themes.php
parent5415c2e847032896907946c98d68a254399e4416 (diff)
downloadampache-27158141ee1a14b7d23ae8997d2c41b49fc904d9.tar.gz
ampache-27158141ee1a14b7d23ae8997d2c41b49fc904d9.tar.bz2
ampache-27158141ee1a14b7d23ae8997d2c41b49fc904d9.zip
initial ratings mojo, some stylesheet fixes, changed user preferences again and a db update
Diffstat (limited to 'lib/themes.php')
-rw-r--r--lib/themes.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/themes.php b/lib/themes.php
index bb6c180a..1c67c5a7 100644
--- a/lib/themes.php
+++ b/lib/themes.php
@@ -75,6 +75,13 @@ function get_theme($name) {
*/
function set_theme_colors($theme_name,$user_id) {
+
+
+ if (make_bool($user_id)) {
+ $user_sql = "`user`='$user_id' AND";
+ }
+
+
/* We assume if we've made it this far we've got the right to do it
This could be dangerous but eah!
*/
@@ -89,7 +96,7 @@ function set_theme_colors($theme_name,$user_id) {
$results = mysql_fetch_array($db_results);
- $sql = "UPDATE user_preference SET `value`='" . sql_escape($color) . "' WHERE `user`='" . $user_id . "' AND " .
+ $sql = "UPDATE user_preference SET `value`='" . sql_escape($color) . "' WHERE $user_sql " .
" preference='" . $results[0] . "'";
$db_results = mysql_query($sql, dbh());