diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-01-18 08:39:13 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-01-18 08:39:13 +0000 |
commit | e2a9f3e557eda5a76abff96bb8b48432a8962e97 (patch) | |
tree | 95bcee3be52e73d439aebcef43c81526f1de0e8e /lib | |
parent | 5f8db40a3247a38644a8aa07e62b1e6e4a71b1f5 (diff) | |
download | ampache-e2a9f3e557eda5a76abff96bb8b48432a8962e97.tar.gz ampache-e2a9f3e557eda5a76abff96bb8b48432a8962e97.tar.bz2 ampache-e2a9f3e557eda5a76abff96bb8b48432a8962e97.zip |
fixed the 0 rating hover and removed some redudent definitions from the stylesheet
Diffstat (limited to 'lib')
-rw-r--r-- | lib/themes.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/themes.php b/lib/themes.php index aac16330..3c89a00a 100644 --- a/lib/themes.php +++ b/lib/themes.php @@ -75,8 +75,6 @@ function get_theme($name) { */ function set_theme_colors($theme_name,$user_id) { - - if (make_bool($user_id)) { $user_sql = "`user`='$user_id' AND"; } @@ -87,18 +85,20 @@ function set_theme_colors($theme_name,$user_id) { */ $theme = get_theme($theme_name); $GLOBALS['theme'] = $theme; - if (!count($theme['color'])) { return false; } + if (!count($theme)) { return false; } - foreach ($theme['color'] as $key=>$color) { + foreach ($theme as $key=>$color) { $sql = "SELECT id FROM preferences WHERE name='" . sql_escape($key) . "'"; $db_results = mysql_query($sql, dbh()); $results = mysql_fetch_array($db_results); - - $sql = "UPDATE user_preference SET `value`='" . sql_escape($color) . "' WHERE $user_sql " . - " preference='" . $results[0] . "'"; - $db_results = mysql_query($sql, dbh()); + // Quick hack this needs to be fixed + if ($results) { + $sql = "UPDATE user_preference SET `value`='" . sql_escape($color) . "' WHERE $user_sql " . + " preference='" . $results[0] . "'"; + $db_results = mysql_query($sql, dbh()); + } } // theme colors |