aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/feedController.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controllers/feedController.php')
-rwxr-xr-xapp/Controllers/feedController.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index b8ccaf963..4750f4558 100755
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -700,14 +700,16 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
//Extract all feed entries from database, load complete content and store them back in database.
$entries = $entryDAO->listWhere('f', $feed_id, FreshRSS_Entry::STATE_ALL, 'DESC', 0);
- $entryDAO->beginTransaction();
+ //We need another DB connection in parallel
+ Minz_ModelPdo::$usesSharedPdo = false;
+ $entryDAO2 = FreshRSS_Factory::createEntryDao();
foreach ($entries as $entry) {
$entry->loadCompleteContent(true);
- $entryDAO->updateEntry($entry->toArray());
+ $entryDAO2->updateEntry($entry->toArray());
}
- $entryDAO->commit();
+ Minz_ModelPdo::$usesSharedPdo = true;
//Give feedback to user.
Minz_Request::good(_t('feedback.sub.feed.reloaded', $feed->name()), array(
@@ -755,8 +757,9 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
//Get first entry (syntax robust for Generator or Array)
foreach ($entries as $myEntry) {
- $entry = $myEntry;
- break;
+ if ($entry == null) {
+ $entry = $myEntry;
+ }
}
if ($entry == null) {