aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/entryController.php
diff options
context:
space:
mode:
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);
}
}