summaryrefslogtreecommitdiff
path: root/classes/feeds.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-10-22 13:24:10 +0300
committerAndrew Dolgov <[email protected]>2021-10-22 13:24:10 +0300
commit41245da8a65dc8701eb0f2df0bc614d14822ff87 (patch)
tree684da0e8a3e811d239e07b5c5ade9c547fee3d17 /classes/feeds.php
parent6fe0751038d530aaecbd2e494833ebc27777d05f (diff)
pluginhost: update comments for HOOK_ constants to use phpdoc syntax; add HOOK_PRE_SUBSCRIBE
Diffstat (limited to 'classes/feeds.php')
-rwxr-xr-xclasses/feeds.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/classes/feeds.php b/classes/feeds.php
index 7b6b35645..db62bd6a8 100755
--- a/classes/feeds.php
+++ b/classes/feeds.php
@@ -1013,6 +1013,13 @@ class Feeds extends Handler_Protected {
if (!$url) return ["code" => 2];
+ PluginHost::getInstance()->chain_hooks_callback(PluginHost::HOOK_PRE_SUBSCRIBE,
+ /** @phpstan-ignore-next-line */
+ function ($result) use (&$url, &$auth_login, &$auth_pass) {
+ // arguments are updated inside the hook (if needed)
+ },
+ $url, $auth_login, $auth_pass);
+
$contents = UrlHelper::fetch($url, false, $auth_login, $auth_pass);
PluginHost::getInstance()->chain_hooks_callback(PluginHost::HOOK_SUBSCRIBE_FEED,