From: Andrew Dolgov Date: Sat, 26 Nov 2005 06:56:22 +0000 (+0100) Subject: change theme interface tweaks X-Git-Tag: schema_feature_freeze_for_1.1~79 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=6752e33006437d98cd4995f911aa1e344e273809;p=tt-rss.git change theme interface tweaks --- diff --git a/backend.php b/backend.php index 98c77e37..79b016f3 100644 --- a/backend.php +++ b/backend.php @@ -2287,11 +2287,21 @@ $theme_qpart = "'$theme'"; } + $result = db_query($link, "SELECT id,theme_path FROM ttrss_themes + WHERE theme_name = '$theme'"); + + if (db_num_rows($result) == 1) { + $theme_id = db_fetch_result($result, 0, "id"); + $theme_path = db_fetch_result($result, 0, "theme_path"); + } else { + $theme_id = "NULL"; + $theme_path = ""; + } + db_query($link, "UPDATE ttrss_users SET - theme_id = (SELECT id FROM ttrss_themes WHERE - theme_name = '$theme') WHERE id = " . $_SESSION["uid"]); + theme_id = $theme_id WHERE id = " . $_SESSION["uid"]); - $_SESSION["theme"] = $theme; + $_SESSION["theme"] = $theme_path; header("Location: prefs.php"); @@ -2362,17 +2372,6 @@ } - print "
"; - - print ""; - print ""; - - print ""; - - print ""; - print "

Themes

Select theme"; + print ""; + print ""; + print ""; + print "

Themes

Select theme
"; + print ""; + print "

"; + print ""; } - print "

"; - print ""; - print "

"; - print ""; - $result = db_query($link, "SELECT ttrss_user_prefs.pref_name,short_desc,help_text,value,type_name, section_name,def_value