From 2b3a08e3dd5bf936d6d76a5f5282933e3ca6aeea Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Wed, 24 Oct 2012 00:15:30 +0200 Subject: Passage à du stockage en base de données MySQL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/entryController.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'app/controllers/entryController.php') diff --git a/app/controllers/entryController.php b/app/controllers/entryController.php index a99038068..753994a2b 100755 --- a/app/controllers/entryController.php +++ b/app/controllers/entryController.php @@ -24,19 +24,14 @@ class entryController extends ActionController { $is_read = false; } + $values = array ( + 'is_read' => $is_read, + ); + $entryDAO = new EntryDAO (); if ($id == false) { - $entries = $entryDAO->listEntries ('not_read'); + $entryDAO->updateEntries ($values); } else { - $entry = $entryDAO->searchById ($id); - $entries = $entry !== false ? array ($entry) : array (); - } - - foreach ($entries as $entry) { - $values = array ( - 'is_read' => $is_read, - ); - $entryDAO->updateEntry ($entry->id (), $values); } } -- cgit v1.2.3