diff options
Diffstat (limited to 'classes/RPC.php')
| -rw-r--r-- | classes/RPC.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/classes/RPC.php b/classes/RPC.php index 031bef509..a4a48242e 100644 --- a/classes/RPC.php +++ b/classes/RPC.php @@ -69,6 +69,8 @@ class RPC extends Handler_Protected { $sth->execute([$mark, $id, $_SESSION['uid']]); + PluginHost::getInstance()->run_hooks(PluginHost::HOOK_ARTICLES_MARK_TOGGLED, [$id]); + print json_encode(array("message" => "UPDATE_COUNTERS")); } @@ -95,6 +97,8 @@ class RPC extends Handler_Protected { $sth->execute([$pub, $id, $_SESSION['uid']]); + PluginHost::getInstance()->run_hooks(PluginHost::HOOK_ARTICLES_PUBLISH_TOGGLED, [$id]); + print json_encode(array("message" => "UPDATE_COUNTERS")); } @@ -345,6 +349,8 @@ class RPC extends Handler_Protected { } $sth->execute([...$ids, $_SESSION['uid']]); + + PluginHost::getInstance()->run_hooks(PluginHost::HOOK_ARTICLES_MARK_TOGGLED, $ids); } /** @@ -369,6 +375,8 @@ class RPC extends Handler_Protected { } $sth->execute([...$ids, $_SESSION['uid']]); + + PluginHost::getInstance()->run_hooks(PluginHost::HOOK_ARTICLES_PUBLISH_TOGGLED, $ids); } function log(): void { |