]> git.wh0rd.org - tt-rss.git/commitdiff
Add subscribe hook, give more information to fetch_feed hook
authorwltb <wltb@safe-mail.net>
Sat, 17 May 2014 15:51:35 +0000 (17:51 +0200)
committerwltb <wltb@safe-mail.net>
Mon, 19 May 2014 12:06:52 +0000 (14:06 +0200)
classes/pluginhost.php
include/functions.php
include/rssfuncs.php

index bd6afa81d5b41e012dcebb20ea06bac6f8df0953..744337e0f67b5a82d21ae842e30ccd4a31f03b51 100644 (file)
@@ -41,6 +41,7 @@ class PluginHost {
        const HOOK_HOUSE_KEEPING = 24;
        const HOOK_SEARCH = 25;
        const HOOK_FORMAT_ENCLOSURES = 26;
+       const HOOK_SUBSCRIBE_FEED = 27;
 
        const KIND_ALL = 1;
        const KIND_SYSTEM = 2;
index 01d8d47f885d821fdce938e07ad03b2ca7a701dc..2e76f157beebe60e131dfac680cf71b52003f6ef 100644 (file)
                        return array("code" => 5, "message" => $fetch_last_error);
                }
 
+               foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_SUBSCRIBE_FEED) as $plugin) {
+                       $contents = $plugin->hook_subscribe_feed($contents, $url, $auth_login, $auth_pass);
+               }
+
                if (is_html($contents)) {
                        $feedUrls = get_feeds_from_html($url, $contents);
 
index 15f1df0cc6c4979999495e5474961bd3ef75f898..010071e577dc1da4f8788679be1cf979715d6863 100644 (file)
                        $force_refetch = isset($_REQUEST["force_refetch"]);
 
                        foreach ($pluginhost->get_hooks(PluginHost::HOOK_FETCH_FEED) as $plugin) {
-                               $feed_data = $plugin->hook_fetch_feed($feed_data, $fetch_url, $owner_uid, $feed);
+                               $feed_data = $plugin->hook_fetch_feed($feed_data, $fetch_url, $owner_uid, $feed, $last_article_timestamp, $auth_login, $auth_pass);
                        }
 
                        // try cache