store widescreen status in a cookie (refs #539)

This commit is contained in:
Andrew Dolgov 2013-02-20 14:40:13 +04:00
parent 7726063cf2
commit f03701fe99
2 changed files with 3 additions and 2 deletions

View File

@ -667,7 +667,8 @@ class RPC extends Handler_Protected {
function setpanelmode() {
$wide = (int) $_REQUEST["wide"];
$_SESSION["widescreen"] = $wide;
setcookie("ttrss_widescreen", $wide,
time() + SESSION_COOKIE_LIFETIME);
print json_encode(array("wide" => $wide));
}

View File

@ -1827,7 +1827,7 @@
$params["hotkeys"] = get_hotkeys_map($link);
$params["csrf_token"] = $_SESSION["csrf_token"];
$params["widescreen"] = (int) $_SESSION["widescreen"];
$params["widescreen"] = (int) $_COOKIE["ttrss_widescreen"];
$params['simple_update'] = defined('SIMPLE_UPDATE_MODE') && SIMPLE_UPDATE_MODE;