summaryrefslogtreecommitdiff
path: root/classes/pref/feeds.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-08 22:46:01 +0300
committerAndrew Dolgov <[email protected]>2021-02-08 22:46:01 +0300
commit345dbb35217c36b258520dbf815133613c339a72 (patch)
treed7012f37c3e63531776349bdb4502fa9a3d9241b /classes/pref/feeds.php
parent6c8ccd2acca72f4fe0c2cd0c27329150bbf96a30 (diff)
rewrite some more hooks
Diffstat (limited to 'classes/pref/feeds.php')
-rwxr-xr-xclasses/pref/feeds.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php
index 058acec34..5dc0e75e5 100755
--- a/classes/pref/feeds.php
+++ b/classes/pref/feeds.php
@@ -1586,12 +1586,9 @@ class Pref_Feeds extends Handler_Protected {
}
static function remove_feed($id, $owner_uid) {
- foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_UNSUBSCRIBE_FEED) as $p) {
- if (! $p->hook_unsubscribe_feed($id, $owner_uid)) {
- user_error("Feed $id (owner: $owner_uid) not removed due to plugin error (HOOK_UNSUBSCRIBE_FEED).", E_USER_WARNING);
- return;
- }
- }
+
+ if (PluginHost::getInstance()->run_hooks_until(PluginHost::HOOK_UNSUBSCRIBE_FEED, true, $id, $owner_uid))
+ return;
$pdo = Db::pdo();