]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix sharing for not logged in users
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 4 Oct 2011 10:03:16 +0000 (14:03 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 4 Oct 2011 10:03:16 +0000 (14:03 +0400)
backend.php

index c0050090c2633d6d92b414c5188bcbfb5e04f9df..1d8a99bdd68199b00ac29a316b09aacdf0bcc579 100644 (file)
                $_REQUEST = array_map('stripslashes_deep', $_REQUEST);
        }
 
+       $op = $_REQUEST["op"];
+
        require_once "functions.php";
-       require_once "sessions.php";
+       if ($op != "share") require_once "sessions.php";
        require_once "modules/backend-rpc.php";
        require_once "sanity_check.php";
        require_once "config.php";
@@ -40,7 +42,6 @@
 
        init_connection($link);
 
-       $op = $_REQUEST["op"];
        $subop = $_REQUEST["subop"];
        $mode = $_REQUEST["mode"];
 
                                $id = db_fetch_result($result, 0, "ref_id");
                                $owner_uid = db_fetch_result($result, 0, "owner_uid");
 
+                               $_SESSION["uid"] = $owner_uid;
                                $article = format_article($link, $id, false, true);
+                               $_SESSION["uid"] = "";
 
                                print_r($article['content']);