From: dim0x69 Date: Mon, 27 Nov 2017 10:46:46 +0000 (+0100) Subject: add HOOK_UNSUBSCRIBE_FEED X-Git-Tag: 18.8~119^2^2~1 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=53955264441e178afd894791de734189ed13fb78;p=tt-rss.git add HOOK_UNSUBSCRIBE_FEED --- diff --git a/classes/pluginhost.php b/classes/pluginhost.php index 533e7ee9..f56343c5 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 a86a1af9..fcbc0f8c 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 +}