From: Andrew Dolgov Date: Tue, 23 May 2006 05:07:38 +0000 (+0100) Subject: mobile version uses separate sid X-Git-Tag: 1.2.0~35 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=3dd46f19db3d6ce71a65ea7c1013e16125a24ccc;p=tt-rss.git mobile version uses separate sid --- diff --git a/functions.php b/functions.php index 0c1a959a..c97be42c 100644 --- a/functions.php +++ b/functions.php @@ -940,7 +940,7 @@ function basic_nosid_redirect_check() { if (!SINGLE_USER_MODE) { - if (!$_COOKIE["ttrss_sid"]) { + if (!$_COOKIE[get_session_cookie_name()]) { $redirect_uri = get_login_redirect(); $return_to = preg_replace('/.*?\//', '', $_SERVER["REQUEST_URI"]); header("Location: $redirect_uri?rt=$return_to"); @@ -1684,4 +1684,8 @@ } } + + function get_session_cookie_name() { + return ((!defined('TTRSS_SESSION_NAME')) ? "ttrss_sid" : TTRSS_SESSION_NAME); + } ?> diff --git a/login.php b/login.php index 06b95353..a7b6ca42 100644 --- a/login.php +++ b/login.php @@ -20,7 +20,7 @@ $password = $_POST["password"]; $return_to = $_POST["rt"]; - if ($_COOKIE["ttrss_sid"]) { + if ($_COOKIE[get_session_cookie_name()]) { require_once "sessions.php"; if ($_SESSION["uid"]) { initialize_user_prefs($link, $_SESSION["uid"]); diff --git a/mobile/functions.php b/mobile/functions.php index 6169a352..c3d7cdb8 100644 --- a/mobile/functions.php +++ b/mobile/functions.php @@ -1,5 +1,6 @@