From 96f0a3e79d7c01831472b1e58b2a7646fbb7deff Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 23 Jan 2013 15:36:32 +0400 Subject: [PATCH] remove themes/ --- classes/pref/prefs.php | 34 +---------- include/functions.php | 113 +---------------------------------- index.php | 1 - js/tt-rss.js | 8 --- prefs.php | 1 - themes/triple-pane/theme.css | 10 ---- themes/triple-pane/theme.ini | 5 -- themes/triple-pane/theme.js | 16 ----- 8 files changed, 3 insertions(+), 185 deletions(-) delete mode 100644 themes/triple-pane/theme.css delete mode 100644 themes/triple-pane/theme.ini delete mode 100644 themes/triple-pane/theme.js diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index bb82b355..4f6c27a3 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -42,8 +42,6 @@ class Pref_Prefs extends Handler_Protected { $_SESSION["prefs_cache"] = false; - $orig_theme = get_pref($this->link, "_THEME_ID"); - foreach (array_keys($_POST) as $pref_name) { $pref_name = db_escape_string($pref_name); @@ -62,11 +60,7 @@ class Pref_Prefs extends Handler_Protected { } - if ($orig_theme != get_pref($this->link, "_THEME_ID")) { - print "PREFS_THEME_CHANGED"; - } else { - print __("The configuration was saved."); - } + print __("The configuration was saved."); } function getHelp() { @@ -458,32 +452,6 @@ class Pref_Prefs extends Handler_Protected { print "

".__($active_section)."

"; - if ($line["section_id"] == 2) { - print "".__("Select theme").""; - - $user_theme = get_pref($this->link, "_THEME_ID"); - $themes = get_all_themes(); - - print ""; - } $lnum = 0; } diff --git a/include/functions.php b/include/functions.php index 029b3248..9dea353a 100644 --- a/include/functions.php +++ b/include/functions.php @@ -759,115 +759,9 @@ } } + // Deprecated, TODO: remove function theme_image($link, $filename) { - if ($link) { - $theme_path = get_user_theme_path($link); - - if ($theme_path && is_file($theme_path.$filename)) { - return $theme_path.$filename; - } else { - return $filename; - } - } else { - return $filename; - } - } - - function get_user_theme($link) { - - if (get_schema_version($link) >= 63 && $_SESSION["uid"]) { - $theme_name = get_pref($link, "_THEME_ID"); - if (is_dir("themes/$theme_name")) { - return $theme_name; - } else { - return ''; - } - } else { - return ''; - } - - } - - function get_user_theme_path($link) { - $theme_path = ''; - - if (get_schema_version($link) >= 63 && $_SESSION["uid"]) { - $theme_name = get_pref($link, "_THEME_ID"); - - if ($theme_name && is_dir("themes/$theme_name")) { - $theme_path = "themes/$theme_name/"; - } else { - $theme_name = ''; - } - } else { - $theme_path = ''; - } - - if ($theme_path) { - if (is_file("$theme_path/theme.ini")) { - $ini = parse_ini_file("$theme_path/theme.ini", true); - if ($ini['theme']['version'] >= THEME_VERSION_REQUIRED) { - return $theme_path; - } - } - } - return ''; - } - - function get_user_theme_options($link) { - $t = get_user_theme_path($link); - - if ($t) { - if (is_file("$t/theme.ini")) { - $ini = parse_ini_file("$t/theme.ini", true); - if ($ini['theme']['version']) { - return $ini['theme']['options']; - } - } - } - return ''; - } - - function print_theme_includes($link) { - - $t = get_user_theme_path($link); - $time = time(); - - if ($t) { - print ""; - if (file_exists("$t/theme.js")) { - print ""; - } - } - } - - function get_all_themes() { - $themes = glob("themes/*"); - - asort($themes); - - $rv = array(); - - foreach ($themes as $t) { - if (is_file("$t/theme.ini")) { - $ini = parse_ini_file("$t/theme.ini", true); - if ($ini['theme']['version'] >= THEME_VERSION_REQUIRED && - !$ini['theme']['disabled']) { - $entry = array(); - $entry["path"] = $t; - $entry["base"] = basename($t); - $entry["name"] = $ini['theme']['name']; - $entry["version"] = $ini['theme']['version']; - $entry["author"] = $ini['theme']['author']; - $entry["options"] = $ini['theme']['options']; - array_push($rv, $entry); - } - } - } - - return $rv; + return $filename; } function convert_timestamp($timestamp, $source_tz, $dest_tz) { @@ -1933,9 +1827,6 @@ function make_init_params($link) { $params = array(); - $params["theme"] = get_user_theme($link); - $params["theme_options"] = get_user_theme_options($link); - $params["sign_progress"] = theme_image($link, "images/indicator_white.gif"); $params["sign_progress_tiny"] = theme_image($link, "images/indicator_tiny.gif"); $params["sign_excl"] = theme_image($link, "images/sign_excl.svg"); diff --git a/index.php b/index.php index f07ee056..0d0646c7 100644 --- a/index.php +++ b/index.php @@ -53,7 +53,6 @@ -