diff options
author | Andrew Dolgov <[email protected]> | 2012-12-25 10:02:08 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2012-12-25 10:02:08 +0400 |
commit | d2a421e3cbaa782748840fc19afad4ac65f044b8 (patch) | |
tree | fed3583a4f855c5c0c7c7a9d6c3f8effc94932d6 /include/rssfuncs.php | |
parent | de612e7a3850d3053c7038e94098c0681d46983b (diff) |
more work on user-selectable plugins; properly process system and user plugins
Diffstat (limited to 'include/rssfuncs.php')
-rw-r--r-- | include/rssfuncs.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/rssfuncs.php b/include/rssfuncs.php index 2105de330..d3286a538 100644 --- a/include/rssfuncs.php +++ b/include/rssfuncs.php @@ -263,7 +263,14 @@ if (!$rss->error()) { - global $pluginhost; + // We use local pluginhost here because we need to load different per-user feed plugins + $user_plugins = get_pref($link, "_ENABLED_PLUGINS", $owner_uid); + + $pluginhost = new PluginHost($link); + + $pluginhost->load(PLUGINS, $pluginhost::KIND_ALL); + $pluginhost->load($plugins, $pluginhost::KIND_USER); + $pluginhost->run_hooks($pluginhost::HOOK_FEED_PARSED, "hook_feed_parsed", $rss); if ($debug_enabled) { @@ -538,7 +545,6 @@ "tags" => $entry_tags, "author" => $entry_author); - global $pluginhost; foreach ($pluginhost->get_hooks($pluginhost::HOOK_ARTICLE_FILTER) as $plugin) { $article = $plugin->hook_article_filter($article); } |