From 82b7e7b4c573358970204e2e6fe9913ea13063c1 Mon Sep 17 00:00:00 2001 From: x86dev Date: Sun, 16 Dec 2018 19:37:02 +0100 Subject: [PATCH] Reset the theme to default when starting the container. This should help avoiding messed up installations when themes break in the future. The user has to (re-)select the preferred theme manually then. --- root/srv/ttrss-configure-db.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/root/srv/ttrss-configure-db.php b/root/srv/ttrss-configure-db.php index a4688d5..7c7a4ad 100644 --- a/root/srv/ttrss-configure-db.php +++ b/root/srv/ttrss-configure-db.php @@ -63,7 +63,12 @@ $pdo = dbconnect($config); try { $pdo->query('SELECT 1 FROM ttrss_feeds'); echo 'Connection to database successful' . PHP_EOL; - // reached this point => table found, assume db is complete + // Reached this point => table found, assume db is complete + + // Make sure to set the default theme provided by TT-RSS. + // Other themes might break everything after an update, so play safe here. + echo 'Resetting theme to default ...' . PHP_EOL; + $pdo->query("UPDATE ttrss_user_prefs SET value = '' WHERE pref_name = 'USER_CSS_THEME'"); } catch (PDOException $e) { echo 'Database table not found, applying schema... ' . PHP_EOL;