]> git.wh0rd.org Git - tt-rss.git/commitdiff
store widescreen status in a cookie (refs #539)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 20 Feb 2013 10:40:13 +0000 (14:40 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 20 Feb 2013 10:40:13 +0000 (14:40 +0400)
classes/rpc.php
include/functions.php

index 5cc2235e8188eedefb448a285aaf2a116aaee46a..46c8b0d85eba96f94efddf5c0a633df00dbfc489 100644 (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));
        }
index 37cfd48449b305a5c03f40ce518e8da11acdfa7d..ea538dbb373a679484789154476f59a64b8494fb 100644 (file)
                $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;