summaryrefslogtreecommitdiff
path: root/app/controllers/entryController.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2012-10-24 00:15:30 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2012-10-24 00:15:30 +0200
commit2b3a08e3dd5bf936d6d76a5f5282933e3ca6aeea (patch)
treecccfcebea7af1c9c7e17281c2408256cd2f73fd8 /app/controllers/entryController.php
parent00deff113f346aa9fec15c791502341f6401b94d (diff)
Passage à du stockage en base de données MySQL
Diffstat (limited to 'app/controllers/entryController.php')
-rwxr-xr-xapp/controllers/entryController.php15
1 files changed, 5 insertions, 10 deletions
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);
}
}