From cda55d67d0fffa4751e8377b2b4e3a0a522397c5 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 28 Mar 2013 08:19:28 +0400 Subject: [PATCH] add cleanup_tags/purge orphans to globalUpdateFeeds and simple update rpc call (closes #636) --- classes/handler/public.php | 12 ++++++++++++ classes/rpc.php | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/classes/handler/public.php b/classes/handler/public.php index 789db061..ea70b2fc 100644 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -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() { diff --git a/classes/rpc.php b/classes/rpc.php index eb241591..72028759 100644 --- a/classes/rpc.php +++ b/classes/rpc.php @@ -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)); -- 2.39.5