summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authordim0x69 <[email protected]>2017-11-27 11:46:46 +0100
committerdim0x69 <[email protected]>2017-11-27 11:46:46 +0100
commit53955264441e178afd894791de734189ed13fb78 (patch)
tree55164f217bcb89596f5aef8dadf792286ce5783f /classes
parentd7effa92a49b5ed64d0f4cfa87a6aabaf9cfaa93 (diff)
add HOOK_UNSUBSCRIBE_FEED
Diffstat (limited to 'classes')
-rw-r--r--classes/pluginhost.php1
-rwxr-xr-xclasses/pref/feeds.php6
2 files changed, 6 insertions, 1 deletions
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
+}