From dce46cade3ef1d24a12cf6d27abad5d93de95373 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 14 Jan 2010 13:39:05 +0300 Subject: query themes from filesystem; obsolete ttrss_themes --- modules/pref-prefs.php | 42 ++++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 24 deletions(-) (limited to 'modules/pref-prefs.php') diff --git a/modules/pref-prefs.php b/modules/pref-prefs.php index 367dfe406..9b58cdbb4 100644 --- a/modules/pref-prefs.php +++ b/modules/pref-prefs.php @@ -85,7 +85,7 @@ // print_r($_POST); - $orig_theme_id = get_pref($link, "_THEME_ID"); + $orig_theme = get_pref($link, "_THEME_ID"); foreach (array_keys($_POST) as $pref_name) { @@ -96,17 +96,7 @@ } - if ($orig_theme_id != get_pref($link, "_THEME_ID")) { - - $result = db_query($link, "SELECT theme_path FROM ttrss_themes - WHERE id = '".get_pref($link, "_THEME_ID")."'"); - - if (db_num_rows($result) == 1) { - $theme_path = db_fetch_result($result, 0, "theme_path"); - } else { - $theme_path = ""; - } - + if ($orig_theme != get_pref($link, "_THEME_ID")) { print "PREFS_THEME_CHANGED"; } else { print __("The configuration was saved."); @@ -329,24 +319,28 @@ if ($line["section_id"] == 2) { print "".__("Select theme").""; + + $user_theme = get_pref($link, "_THEME_ID"); + $themes = get_all_themes(); + print ""; } -- cgit v1.2.3