diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2025-05-02 18:40:47 +0000 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2025-05-02 18:40:47 +0000 |
| commit | bc0da8edb699eec9fb6424bb5d8650ac48dca69d (patch) | |
| tree | 1433d63b437b719bca1f11f9b6a605352aac3677 /classes/RSSUtils.php | |
| parent | 4ae17d0f1c956bfe392653ab847eb2e3da6f7bfc (diff) | |
| parent | 3098dc0a163b4b70105da2eae1237057ae97ccb1 (diff) | |
Merge branch 'marked-hook' into 'master'
add plugin hooks invoked when articles get un/marked or un/published
See merge request tt-rss/tt-rss!123
Diffstat (limited to 'classes/RSSUtils.php')
| -rw-r--r-- | classes/RSSUtils.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/classes/RSSUtils.php b/classes/RSSUtils.php index 547cc094b..20c4bd417 100644 --- a/classes/RSSUtils.php +++ b/classes/RSSUtils.php @@ -1132,6 +1132,12 @@ class RSSUtils { $sth->execute([$ref_id, $feed_obj->owner_uid, $feed, $unread, $last_read_qpart, $marked, $published, $score]); + if ($marked) + PluginHost::getInstance()->run_hooks(PluginHost::HOOK_ARTICLES_MARK_TOGGLED, [$ref_id]); + + if ($published) + PluginHost::getInstance()->run_hooks(PluginHost::HOOK_ARTICLES_PUBLISH_TOGGLED, [$ref_id]); + $sth = $pdo->prepare("SELECT int_id FROM ttrss_user_entries WHERE ref_id = ? AND owner_uid = ? AND feed_id = ? LIMIT 1"); |