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];
|
$value = $_POST[$pref_name];
|
||||||
|
|
||||||
if ($pref_name == 'DIGEST_PREFERRED_TIME') {
|
switch ($pref_name) {
|
||||||
if (get_pref('DIGEST_PREFERRED_TIME') != $value) {
|
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 = ?");
|
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") {
|
case 'USER_CSS_THEME':
|
||||||
if ($_SESSION["language"] != $value) {
|
if (!$need_reload) $need_reload = get_pref($pref_name) != $value;
|
||||||
$need_reload = true;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set_pref($pref_name, $value);
|
set_pref($pref_name, $value);
|
||||||
|
|
Loading…
Reference in New Issue