summaryrefslogtreecommitdiff
path: root/app/Controllers/importExportController.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controllers/importExportController.php')
-rw-r--r--app/Controllers/importExportController.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/app/Controllers/importExportController.php b/app/Controllers/importExportController.php
index 6ae89defb..2bc68848c 100644
--- a/app/Controllers/importExportController.php
+++ b/app/Controllers/importExportController.php
@@ -464,18 +464,22 @@ class FreshRSS_importExport_Controller extends Minz_ActionController {
}
$values = $entry->toArray();
+ $ok = false;
if (isset($existingHashForGuids[$entry->guid()])) {
- $id = $this->entryDAO->updateEntry($values);
+ $ok = $this->entryDAO->updateEntry($values);
} else {
- $id = $this->entryDAO->addEntry($values);
+ $ok = $this->entryDAO->addEntry($values);
}
+ $error |= ($ok === false);
- if (!$error && ($id === false)) {
- $error = true;
- }
}
$this->entryDAO->commit();
+ $this->entryDAO->beginTransaction();
+ $this->entryDAO->commitNewEntries();
+ $this->feedDAO->updateCachedValues();
+ $this->entryDAO->commit();
+
return !$error;
}