aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/feedController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-03-26 00:01:11 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-03-26 00:01:11 +0100
commit22b41f3bfcbd5a54d59789c2cebfda6dc23b7dde (patch)
tree791c68ecdf3b5fb6816ab82eaed5ce454a81e4dc /app/Controllers/feedController.php
parenta513ca9030314dec0f01b3cc147ceaf0c9b14d88 (diff)
Candidate implementation of defered insertion
https://github.com/FreshRSS/FreshRSS/issues/530
Diffstat (limited to 'app/Controllers/feedController.php')
-rwxr-xr-xapp/Controllers/feedController.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index f71f26a4e..a2d9d5c35 100755
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -226,7 +226,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
}
}
- public static function actualizeFeed($feed_id, $feed_url, $force, $simplePiePush = null, $isNewFeed = false) {
+ public static function actualizeFeed($feed_id, $feed_url, $force, $simplePiePush = null, $isNewFeed = false, $noCommit = false) {
@set_time_limit(300);
$feedDAO = FreshRSS_Factory::createFeedDao();
@@ -434,6 +434,9 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
break;
}
}
+ if (!$noCommit) {
+ $entryDAO->commitNewEntries();
+ }
return array($updated_feeds, reset($feeds));
}
@@ -452,8 +455,9 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
$id = Minz_Request::param('id');
$url = Minz_Request::param('url');
$force = Minz_Request::param('force');
+ $noCommit = Minz_Session::param('isLastFeed', 1) != 1;
- list($updated_feeds, $feed) = self::actualizeFeed($id, $url, $force);
+ list($updated_feeds, $feed) = self::actualizeFeed($id, $url, $force, null, false, $noCommit);
if (Minz_Request::param('ajax')) {
// Most of the time, ajax request is for only one feed. But since