1
0
mirror of https://tt-rss.org/git/tt-rss.git synced 2024-06-28 12:10:52 +02:00

Merge branch 'master' of dim0x69/tt-rss into master

This commit is contained in:
fox 2017-12-11 09:47:04 +00:00 committed by Gogs
commit c463a95dca
2 changed files with 10 additions and 1 deletions

View File

@ -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;

10
classes/pref/feeds.php Executable file → Normal file
View File

@ -1739,6 +1739,14 @@ class Pref_Feeds extends Handler_Protected {
}
static function remove_feed($id, $owner_uid) {
$debug = isset($_REQUEST["debug"]);
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_UNSUBSCRIBE_FEED) as $p) {
if( ! $p->hook_unsubscribe_feed($id, $owner_uid)){
if($debug) _debug("Feed not removed due to Error in Plugin. (HOOK_UNSUBSCRIBE_FEED)");
return;
}
}
if ($id > 0) {
@ -1969,4 +1977,4 @@ class Pref_Feeds extends Handler_Protected {
return $url_path;
}
}
}