diff options
| author | 2017-06-03 15:18:04 +0200 | |
|---|---|---|
| committer | 2017-06-03 15:18:04 +0200 | |
| commit | fd43ee546e419fc9fbb9a3ad974d2234d94cffaa (patch) | |
| tree | 2df9fd1daf5b994d7bbde8dd46f7605e4370c268 /app/Controllers/importExportController.php | |
| parent | be0bcfef7e38f27284ec7b377b342ba389515964 (diff) | |
| parent | 6f3653d430c86b026f8e007a276fdba2b09b61b3 (diff) | |
Merge pull request #1549 from FreshRSS/dev1.7.0
Version 1.7.0
Diffstat (limited to 'app/Controllers/importExportController.php')
| -rw-r--r-- | app/Controllers/importExportController.php | 14 |
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; } |
