]> git.wh0rd.org Git - tt-rss.git/commitdiff
backend/rss: fix previous patch breaking active session id (refs #318)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 9 Feb 2011 09:41:35 +0000 (12:41 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 9 Feb 2011 09:41:35 +0000 (12:41 +0300)
backend.php

index 4c9813cdaf5c0c0746a60be3b13794ccb14f7f57..8381c9dcb380ed91e22d01cfc8e584b3e9afc699 100644 (file)
                                authenticate_user($link, "admin", null);
                        }
 
-                       if ($key) {
-                               $_SESSION['uid'] = false; // do not fallback to active session id
+                       $owner_id = false;
 
+                       if ($key) {
                                $result = db_query($link, "SELECT owner_uid FROM
                                        ttrss_access_keys WHERE access_key = '$key' AND feed_id = '$feed'");
 
                                if (db_num_rows($result) == 1)
-                                       $_SESSION["uid"] = db_fetch_result($result, 0, "owner_uid");
+                                       $owner_id = db_fetch_result($result, 0, "owner_uid");
                        }
 
-                       if ($_SESSION["uid"]) {
+                       if ($owner_id) {
+                               $_SESSION['uid'] = $owner_id;
+
                                generate_syndicated_feed($link, 0, $feed, $is_cat, $limit,
                                        $search, $search_mode, $match_on, $view_mode);
                        } else {