From: Andrew Dolgov Date: Wed, 19 Sep 2012 08:45:01 +0000 (+0400) Subject: api: use tt-rss session storage X-Git-Tag: 1.6.0~27 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=964f1533719ea43a5075c08dd227a01a47f5b2aa;p=tt-rss.git api: use tt-rss session storage --- diff --git a/api/index.php b/api/index.php index c3199857..f3c22be0 100644 --- a/api/index.php +++ b/api/index.php @@ -10,9 +10,12 @@ chdir(".."); + define('TTRSS_SESSION_NAME', 'ttrss_api_sid'); + require_once "db.php"; require_once "db-prefs.php"; require_once "functions.php"; + require_once "sessions.php"; define('AUTH_DISABLE_OTP', true); diff --git a/include/sessions.php b/include/sessions.php index 5aeda62f..e692d116 100644 --- a/include/sessions.php +++ b/include/sessions.php @@ -104,5 +104,7 @@ session_set_cookie_params(SESSION_COOKIE_LIFETIME); - session_start(); + if (!defined('TTRSS_SESSION_NAME') || TTRSS_SESSION_NAME != 'ttrss_api_sid') { + session_start(); + } ?>