From 53955264441e178afd894791de734189ed13fb78 Mon Sep 17 00:00:00 2001 From: dim0x69 Date: Mon, 27 Nov 2017 11:46:46 +0100 Subject: [PATCH] add HOOK_UNSUBSCRIBE_FEED --- classes/pluginhost.php | 1 + classes/pref/feeds.php | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/classes/pluginhost.php b/classes/pluginhost.php index 533e7ee91..f56343c5f 100644 --- a/classes/pluginhost.php +++ b/classes/pluginhost.php @@ -56,6 +56,7 @@ class PluginHost { const HOOK_FORMAT_ARTICLE_CDM = 35; const HOOK_FEED_BASIC_INFO = 36; const HOOK_SEND_LOCAL_FILE = 37; + const HOOK_UNSUBSCRIBE_FEED = 38; const KIND_ALL = 1; const KIND_SYSTEM = 2; diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index a86a1af94..fcbc0f8cd 100755 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -1740,6 +1740,10 @@ class Pref_Feeds extends Handler_Protected { static function remove_feed($id, $owner_uid) { + foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_UNSUBSCRIBE_FEED) as $p) { + $line = $p->hook_unsubscribe_feed($id, $owner_uid); + } + if ($id > 0) { /* save starred articles in Archived feed */ @@ -1969,4 +1973,4 @@ class Pref_Feeds extends Handler_Protected { return $url_path; } -} \ No newline at end of file +}