]> git.wh0rd.org Git - tt-rss.git/commitdiff
api: use tt-rss session storage
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 19 Sep 2012 08:45:01 +0000 (12:45 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 19 Sep 2012 08:45:01 +0000 (12:45 +0400)
api/index.php
include/sessions.php

index c3199857be63d859d279492f6d9c57e8d353b158..f3c22be05a12e80db6fd7d33db7137d24e0b900d 100644 (file)
 
        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);
 
index 5aeda62ff1f21e037117ddad4701ffefa8822222..e692d11697a67eb07251754af79fe2232315f9c1 100644 (file)
 
        session_set_cookie_params(SESSION_COOKIE_LIFETIME);
 
-       session_start();
+       if (!defined('TTRSS_SESSION_NAME') || TTRSS_SESSION_NAME != 'ttrss_api_sid') {
+               session_start();
+       }
 ?>