prefs: reload on user theme change
This commit is contained in:
parent
7b0f4f1e46
commit
4fdcc923f0
|
@ -101,20 +101,23 @@ class Pref_Prefs extends Handler_Protected {
|
|||
|
||||
$value = $_POST[$pref_name];
|
||||
|
||||
if ($pref_name == 'DIGEST_PREFERRED_TIME') {
|
||||
if (get_pref('DIGEST_PREFERRED_TIME') != $value) {
|
||||
switch ($pref_name) {
|
||||
case 'DIGEST_PREFERRED_TIME':
|
||||
if (get_pref('DIGEST_PREFERRED_TIME') != $value) {
|
||||
|
||||
$sth = $this->pdo->prepare("UPDATE ttrss_users SET
|
||||
$sth = $this->pdo->prepare("UPDATE ttrss_users SET
|
||||
last_digest_sent = NULL WHERE id = ?");
|
||||
$sth->execute([$_SESSION['uid']]);
|
||||
$sth->execute([$_SESSION['uid']]);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'USER_LANGUAGE':
|
||||
if (!$need_reload) $need_reload = $_SESSION["language"] != $value;
|
||||
break;
|
||||
|
||||
if ($pref_name == "USER_LANGUAGE") {
|
||||
if ($_SESSION["language"] != $value) {
|
||||
$need_reload = true;
|
||||
}
|
||||
case 'USER_CSS_THEME':
|
||||
if (!$need_reload) $need_reload = get_pref($pref_name) != $value;
|
||||
break;
|
||||
}
|
||||
|
||||
set_pref($pref_name, $value);
|
||||
|
|
Loading…
Reference in New Issue