summaryrefslogtreecommitdiff
path: root/classes/handler
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-11-07 14:21:39 +0300
committerAndrew Dolgov <[email protected]>2018-11-07 14:21:39 +0300
commit253dbd48562f0742befe0335278c4e26ac313efe (patch)
treeb5c0e5d8d80cdbe843291e95792627e5f02e62d7 /classes/handler
parent22366ccc5b4b82f6867ded767b318b1ac9978270 (diff)
generate_syndicated_feed: add support for virtual feeds provided by plugins
Diffstat (limited to 'classes/handler')
-rwxr-xr-xclasses/handler/public.php22
1 files changed, 21 insertions, 1 deletions
diff --git a/classes/handler/public.php b/classes/handler/public.php
index de9c9684a..dbed3fee6 100755
--- a/classes/handler/public.php
+++ b/classes/handler/public.php
@@ -33,6 +33,7 @@ class Handler_Public extends Handler {
$date_sort_field = "updated DESC";
break;
}
+
$params = array(
"owner_uid" => $owner_uid,
"feed" => $feed,
@@ -47,7 +48,26 @@ class Handler_Public extends Handler {
"start_ts" => $start_ts
);
- $qfh_ret = Feeds::queryFeedHeadlines($params);
+ if (!$is_cat && is_numeric($feed) && $feed < PLUGIN_FEED_BASE_INDEX && $feed > LABEL_BASE_INDEX) {
+
+ $user_plugins = get_pref("_ENABLED_PLUGINS", $owner_uid);
+
+ $tmppluginhost = new PluginHost();
+ $tmppluginhost->load(PLUGINS, PluginHost::KIND_ALL);
+ $tmppluginhost->load($user_plugins, PluginHost::KIND_USER, $owner_uid);
+ $tmppluginhost->load_data();
+
+ $handler = $tmppluginhost->get_feed_handler(
+ PluginHost::feed_to_pfeed_id($feed));
+
+ if ($handler) {
+ $qfh_ret = $handler->get_headlines(PluginHost::feed_to_pfeed_id($feed),
+ $options);
+ }
+
+ } else {
+ $qfh_ret = Feeds::queryFeedHeadlines($params);
+ }
$result = $qfh_ret[0];
$feed_title = htmlspecialchars($qfh_ret[1]);