summaryrefslogtreecommitdiff
path: root/classes/handler/public.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/handler/public.php')
-rwxr-xr-xclasses/handler/public.php38
1 files changed, 14 insertions, 24 deletions
diff --git a/classes/handler/public.php b/classes/handler/public.php
index 318cecd72..0e990bec7 100755
--- a/classes/handler/public.php
+++ b/classes/handler/public.php
@@ -75,7 +75,7 @@ class Handler_Public extends Handler {
$feed_self_url = get_self_url_prefix() .
"/public.php?op=rss&id=$feed&key=" .
- get_feed_access_key($feed, false, $owner_uid);
+ Feeds::get_feed_access_key($feed, false, $owner_uid);
if (!$feed_site_url) $feed_site_url = get_self_url_prefix();
@@ -298,23 +298,25 @@ class Handler_Public extends Handler {
function share() {
$uuid = clean($_REQUEST["key"]);
- $sth = $this->pdo->prepare("SELECT ref_id, owner_uid FROM ttrss_user_entries WHERE
- uuid = ?");
- $sth->execute([$uuid]);
+ if ($uuid) {
+ $sth = $this->pdo->prepare("SELECT ref_id, owner_uid
+ FROM ttrss_user_entries WHERE uuid = ?");
+ $sth->execute([$uuid]);
- if ($row = $sth->fetch()) {
- header("Content-Type: text/html");
+ if ($row = $sth->fetch()) {
+ header("Content-Type: text/html");
- $id = $row["ref_id"];
- $owner_uid = $row["owner_uid"];
+ $id = $row["ref_id"];
+ $owner_uid = $row["owner_uid"];
- print $this->format_article($id, $owner_uid);
+ print $this->format_article($id, $owner_uid);
- } else {
- header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
- print "Article not found.";
+ return;
+ }
}
+ header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
+ print "Article not found.";
}
private function get_article_image($enclosures, $content, $site_url) {
@@ -728,18 +730,6 @@ class Handler_Public extends Handler {
}
}
- /* function subtest() {
- header("Content-type: text/plain; charset=utf-8");
-
- $url = clean($_REQUEST["url"]);
-
- print "$url\n\n";
-
-
- print_r(get_feeds_from_html($url, fetch_file_contents($url)));
-
- } */
-
function subscribe() {
if (SINGLE_USER_MODE) {
login_sequence();