mirror of
https://github.com/x86dev/docker-ttrss
synced 2025-12-13 01:46:00 +00:00
Made resetting the theme optional via TTRSS_THEME_RESET env var. Default is resetting the theme to the default one though. Untested.
This commit is contained in:
@@ -65,10 +65,12 @@ try {
|
||||
echo 'Connection to database successful' . PHP_EOL;
|
||||
// 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'");
|
||||
if (env('TTRSS_THEME_RESET', '1')) {
|
||||
// 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;
|
||||
|
||||
Reference in New Issue
Block a user