]> git.wh0rd.org Git - tt-rss.git/commitdiff
add cleanup_tags/purge orphans to globalUpdateFeeds and simple update
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 28 Mar 2013 04:19:28 +0000 (08:19 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 28 Mar 2013 04:19:31 +0000 (08:19 +0400)
rpc call (closes #636)

classes/handler/public.php
classes/rpc.php

index 789db0614b18bfd9981309821dfacd9c7c798979..ea70b2fc38b3cb4d4f275c994aefb1012dd5fabe 100644 (file)
@@ -349,6 +349,18 @@ class Handler_Public extends Handler {
                include "rssfuncs.php";
                // Update all feeds needing a update.
                update_daemon_common($this->link, 0, true, false);
+
+               // Update feedbrowser
+               update_feedbrowser_cache($this->link);
+
+               // Purge orphans and cleanup tags
+               purge_orphans($this->link);
+
+               cleanup_tags($this->link, 14, 50000);
+
+               global $pluginhost;
+               $pluginhost->run_hooks($pluginhost::HOOK_UPDATE_TASK, "hook_update_task", $op);
+
        }
 
        function sharepopup() {
index eb241591b966137924b7fe5d44f542708631c7a7..72028759e7286fe69d6090d0a4563be4b88e989b 100644 (file)
@@ -735,6 +735,10 @@ class RPC extends Handler_Protected {
                        }
                }
 
+               // Purge orphans and cleanup tags
+               purge_orphans($this->link);
+               cleanup_tags($this->link, 14, 50000);
+
                if ($num_updated > 0) {
                        print json_encode(array("message" => "UPDATE_COUNTERS",
                                "num_updated" => $num_updated));