From f03701fe9918ffef8c663b15760d3dc1d26f52b8 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 20 Feb 2013 14:40:13 +0400 Subject: [PATCH] store widescreen status in a cookie (refs #539) --- classes/rpc.php | 3 ++- include/functions.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/classes/rpc.php b/classes/rpc.php index 5cc2235e8..46c8b0d85 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 37cfd4844..ea538dbb3 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;