aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/feedController.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controllers/feedController.php')
-rw-r--r--app/Controllers/feedController.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index a7c1d15bc..a63109c31 100644
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -639,6 +639,12 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
// If the entry has changed, there is a good chance for the full content to have changed as well.
$entry->loadCompleteContent(true);
+ $entry = Minz_ExtensionManager::callHook('entry_before_update', $entry);
+ if (!($entry instanceof FreshRSS_Entry)) {
+ // An extension has returned a null value, there is nothing to insert.
+ continue;
+ }
+
$entryDAO->updateEntry($entry->toArray());
}
} else {
@@ -672,6 +678,12 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
$feed->pubSubHubbubError(true);
}
+ $entry = Minz_ExtensionManager::callHook('entry_before_add', $entry);
+ if (!($entry instanceof FreshRSS_Entry)) {
+ // An extension has returned a null value, there is nothing to insert.
+ continue;
+ }
+
if ($entryDAO->addEntry($entry->toArray(), true)) {
$nbNewArticles++;
}