From 021457657186f019a9227e7a2a0b32148ffe4002 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Fri, 12 Sep 2014 21:46:37 +0200 Subject: FIXME (import/export) Use entryDAO addEntryPrepare --- app/Controllers/importExportController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/Controllers') diff --git a/app/Controllers/importExportController.php b/app/Controllers/importExportController.php index 07c097c4a..e7d364efd 100644 --- a/app/Controllers/importExportController.php +++ b/app/Controllers/importExportController.php @@ -239,6 +239,7 @@ class FreshRSS_importExport_Controller extends Minz_ActionController { $error = false; + $prepared_statement = $this->entryDAO->addEntryPrepare(); foreach ($article_object['items'] as $item) { $feed = $this->addFeedArticles($item['origin'], $google_compliant); if (is_null($feed)) { @@ -261,15 +262,14 @@ class FreshRSS_importExport_Controller extends Minz_ActionController { $item[$key_content]['content'], $item['alternate'][0]['href'], $item['published'], $is_read, $starred ); + $entry->_id(min(time(), $entry->date(true)) . uSecString()); $entry->_tags($tags); // FIXME - // Use entryDAO->addEntryPrepare(). // Do not call entryDAO->listLastGuidsByFeed() for each entry. // Consider using a transaction. - $id = $this->entryDAO->addEntryObject( - $entry, $this->view->conf, $feed->keepHistory() - ); + $values = $entry->toArray(); + $id = $this->entryDAO->addEntry($values, $prepared_statement); if (!$error && ($id === false)) { $error = true; -- cgit v1.2.3