summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2025-05-02 08:26:52 +0300
committerAndrew Dolgov <fox@fakecake.org>2025-05-02 08:26:52 +0300
commit0520ca2226f095046eaf57aa8125e88f69ccf376 (patch)
tree2e1644ce3938665bcfa915bc1f4162335191210e
parent5f70e4111889ddf4b97a257abd81f94cac7bac8a (diff)
deal with published hook in _create_published_article
-rw-r--r--classes/Article.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/classes/Article.php b/classes/Article.php
index bfff11e6b..6a3111892 100644
--- a/classes/Article.php
+++ b/classes/Article.php
@@ -98,6 +98,8 @@ class Article extends Handler_Protected {
int_id = ? AND owner_uid = ?");
$sth->execute([$int_id, $owner_uid]);
+ PluginHost::getInstance()->run_hooks(PluginHost::HOOK_ARTICLES_PUBLISHED, [$ref_id]);
+
} else {
$sth = $pdo->prepare("INSERT INTO ttrss_user_entries
@@ -106,6 +108,8 @@ class Article extends Handler_Protected {
VALUES
(?, '', NULL, NULL, ?, true, '', '', NOW(), '', false, NOW())");
$sth->execute([$ref_id, $owner_uid]);
+
+ PluginHost::getInstance()->run_hooks(PluginHost::HOOK_ARTICLES_PUBLISHED, [$ref_id]);
}
if (count($labels) != 0) {
@@ -144,6 +148,8 @@ class Article extends Handler_Protected {
(?, '', NULL, NULL, ?, true, '', '', NOW(), '', false, NOW())");
$sth->execute([$ref_id, $owner_uid]);
+ PluginHost::getInstance()->run_hooks(PluginHost::HOOK_ARTICLES_PUBLISHED, [$ref_id]);
+
if (count($labels) != 0) {
foreach ($labels as $label) {
Labels::add_article($ref_id, trim($label), $owner_uid);