diff options
| author | 2017-05-05 01:43:34 +0900 | |
|---|---|---|
| committer | 2017-05-05 01:43:34 +0900 | |
| commit | cb897980cd930ec73762118ca8e38ec0050ff5e3 (patch) | |
| tree | 37ae732b80e856987739a6409c06cf6da66c95d0 /app/Controllers/importExportController.php | |
| parent | 09787cfd7a68e994f248c0cad0ebe5ae68b7aaf3 (diff) | |
| parent | 53f00571e554f6eeea4fea19d9ddc5eca2ce2997 (diff) | |
Merge branch 'dev' into cli-act-num-articles
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; } |
