diff --git a/backend.php b/backend.php
index fa3be8dc6..98c77e37c 100644
--- a/backend.php
+++ b/backend.php
@@ -160,6 +160,12 @@
Tiny Tiny RSS : Feedlist
";
+ $user_theme = $_SESSION["theme"];
+ if ($user_theme) {
+ print "";
+ }
+
if (get_pref($link, 'USE_COMPACT_STYLESHEET')) {
print "";
@@ -533,8 +539,23 @@
if ($addheader) {
print "
Tiny Tiny RSS : Article $id
-
-
+ ";
+
+ $user_theme = $_SESSION["theme"];
+ if ($user_theme) {
+ print "";
+ }
+
+ if (get_pref($link, 'USE_COMPACT_STYLESHEET')) {
+ print "";
+ } else {
+ print "";
+ }
+
+ print "
";
}
@@ -623,6 +644,12 @@
Tiny Tiny RSS : Feed $feed
";
+ $user_theme = $_SESSION["theme"];
+ if ($user_theme) {
+ print "";
+ }
+
if (get_pref($link, 'USE_COMPACT_STYLESHEET')) {
print "";
@@ -631,6 +658,7 @@
print "";
}
+
print "
@@ -2263,6 +2291,8 @@
theme_id = (SELECT id FROM ttrss_themes WHERE
theme_name = '$theme') WHERE id = " . $_SESSION["uid"]);
+ $_SESSION["theme"] = $theme;
+
header("Location: prefs.php");
} else {
diff --git a/functions.php b/functions.php
index 89bc07d8e..2dc70a161 100644
--- a/functions.php
+++ b/functions.php
@@ -617,6 +617,10 @@
db_query($link, "UPDATE ttrss_users SET last_login = NOW() WHERE id = " .
$_SESSION["uid"]);
+ $user_theme = get_user_theme_path($link);
+
+ $_SESSION["theme"] = $user_theme;
+
initialize_user_prefs($link, $_SESSION["uid"]);
return true;
diff --git a/prefs.php b/prefs.php
index 75cf932c1..559f85109 100644
--- a/prefs.php
+++ b/prefs.php
@@ -16,6 +16,11 @@
Tiny Tiny RSS : Preferences
+ $user_theme = $_SESSION["theme"];
+ if ($user_theme) { ?>
+
+ } ?>
+
$user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?>
if ($user_css_url) { ?>
diff --git a/tt-rss.php b/tt-rss.php
index 7983afca0..9d1dadbb6 100644
--- a/tt-rss.php
+++ b/tt-rss.php
@@ -18,6 +18,11 @@
+ $user_theme = $_SESSION["theme"];
+ if ($user_theme) { ?>
+
+ } ?>
+
$user_css_url = get_pref($link, 'USER_STYLESHEET_URL'); ?>
if ($user_css_url) { ?>