summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);