diff --git a/classes/handler/public.php b/classes/handler/public.php index c06121d02..4d6c117eb 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"]) + ?> + +
+ + + + + + + + + + + + +
+

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