From: Andrew Dolgov Date: Wed, 20 Feb 2013 10:40:13 +0000 (+0400) Subject: store widescreen status in a cookie (refs #539) X-Git-Tag: 1.7.1~67 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=f03701fe9918ffef8c663b15760d3dc1d26f52b8;p=tt-rss.git store widescreen status in a cookie (refs #539) --- diff --git a/classes/rpc.php b/classes/rpc.php index 5cc2235e..46c8b0d8 100644 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -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)); } diff --git a/include/functions.php b/include/functions.php index 37cfd484..ea538dbb 100644 --- a/include/functions.php +++ b/include/functions.php @@ -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;