diff options
author | Andrew Dolgov <[email protected]> | 2011-02-09 12:41:35 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2011-02-09 12:41:35 +0300 |
commit | 8e57cfbeb3ccc0b0770f6baf6a967b0170733b24 (patch) | |
tree | 777c3f040e8db211db2cce8ad2d943307a01f17f | |
parent | 19039fd07b1f8a0d68ca9fe90ff2eb103443f4f5 (diff) |
backend/rss: fix previous patch breaking active session id (refs #318)
-rw-r--r-- | backend.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/backend.php b/backend.php index 4c9813cda..8381c9dcb 100644 --- a/backend.php +++ b/backend.php @@ -464,17 +464,19 @@ 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 { |