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.

This commit is contained in:
x86dev 2018-12-16 19:37:02 +01:00
parent 694983a7c1
commit 82b7e7b4c5

View File

@ -63,7 +63,12 @@ $pdo = dbconnect($config);
try { try {
$pdo->query('SELECT 1 FROM ttrss_feeds'); $pdo->query('SELECT 1 FROM ttrss_feeds');
echo 'Connection to database successful' . PHP_EOL; 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) { catch (PDOException $e) {
echo 'Database table not found, applying schema... ' . PHP_EOL; echo 'Database table not found, applying schema... ' . PHP_EOL;