diff options
author | Andrew Dolgov <[email protected]> | 2011-10-04 14:03:16 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2011-10-04 14:03:16 +0400 |
commit | f9da2388d0059bf73fea515e2c1c6daab5c19400 (patch) | |
tree | 51668847f0b2f65cb5ba83f1da7591381c67375a | |
parent | 701d0ba77fbbea5a99a1afe4d7ec055084b60115 (diff) |
fix sharing for not logged in users
-rw-r--r-- | backend.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/backend.php b/backend.php index c0050090c..1d8a99bdd 100644 --- a/backend.php +++ b/backend.php @@ -14,8 +14,10 @@ $_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"]; @@ -645,7 +646,9 @@ $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']); |