From: Andrew Dolgov Date: Mon, 10 Sep 2012 15:13:41 +0000 (+0400) Subject: allow logging in by sharepopup X-Git-Tag: 1.6.0~56 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=d493aba2386931d8baf76e218e35a77b8c85b618;p=tt-rss.git allow logging in by sharepopup --- diff --git a/classes/handler/public.php b/classes/handler/public.php index c06121d0..4d6c117e 100644 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -386,59 +386,95 @@ class Handler_Public extends Handler { if ($_SESSION["uid"]) { - if (!$action) { + if ($action == 'share') { - print ""; + $title = db_escape_string(strip_tags($_REQUEST["title"])); + $url = db_escape_string(strip_tags($_REQUEST["url"])); + $content = db_escape_string(strip_tags($_REQUEST["content"])); - print ""; + create_published_article($this->link, $title, $url, $content, $_SESSION["uid"]); - print ""; - print ""; + print ""; + } else { $title = htmlspecialchars($_REQUEST["title"]); $url = htmlspecialchars($_REQUEST["url"]); - print ""; - print ""; - print ""; + ?> - print ""; +
"; - print "

".__("Share with Tiny Tiny RSS")."

"; - print "
".__("Title:")."
".__("URL:")."
".__("Content:")."
- print "
+

+
-
". - __("Shared article will appear in the Published feed."). - "
- - "; + - print ""; - print "
"; + + - print ""; + + + + + + - } else { + - $title = db_escape_string(strip_tags($_REQUEST["title"])); - $url = db_escape_string(strip_tags($_REQUEST["url"])); - $content = db_escape_string(strip_tags($_REQUEST["content"])); + +
+ +
+ + + - create_published_article($this->link, $title, $url, $content, $_SESSION["uid"]); + + + + "; - print "window.close();"; - print ""; } } else { - print "
" . __("Not logged in.") . "
"; - + $return = urlencode($_SERVER["REQUEST_URI"]) + ?> + +
+ + + + + + + + + + + + +
+

">
">
+ +
+ + + +
+ +
+