From 6752e33006437d98cd4995f911aa1e344e273809 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 26 Nov 2005 07:56:22 +0100 Subject: [PATCH] change theme interface tweaks --- backend.php | 48 +++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) 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 -- 2.39.2