]> git.wh0rd.org - tt-rss.git/blobdiff - include/rssfuncs.php
more work on user-selectable plugins; properly process system and user plugins
[tt-rss.git] / include / rssfuncs.php
index 2105de3301441b195e2bdc863f4fc121a450d531..d3286a538c7126ea41ce551408437336c349473c 100644 (file)
 
                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) {
                                        "tags" => $entry_tags,
                                        "author" => $entry_author);
 
-                               global $pluginhost;
                                foreach ($pluginhost->get_hooks($pluginhost::HOOK_ARTICLE_FILTER) as $plugin) {
                                        $article = $plugin->hook_article_filter($article);
                                }