diff options
| author | 2018-12-25 01:30:28 +0100 | |
|---|---|---|
| committer | 2018-12-25 01:30:28 +0100 | |
| commit | 4888f919f104b2d170302565e481a0b731eb4145 (patch) | |
| tree | ff2a452f726686a259b565fc2fa036fab695d040 /app/Controllers/entryController.php | |
| parent | 06ea2626e804dd24c2d84fa26c8febf29ef3d357 (diff) | |
Prepare for batch mark as read
Diffstat (limited to 'app/Controllers/entryController.php')
| -rwxr-xr-x | app/Controllers/entryController.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/app/Controllers/entryController.php b/app/Controllers/entryController.php index fc0af0639..9c5ee2616 100755 --- a/app/Controllers/entryController.php +++ b/app/Controllers/entryController.php @@ -97,14 +97,15 @@ class FreshRSS_entry_Controller extends Minz_ActionController { } } } else { - $entryDAO->markRead($id, $is_read); - + $ids = is_array($id) ? $id : array($id); + $entryDAO->markRead($ids, $is_read); $tagDAO = FreshRSS_Factory::createTagDao(); - foreach ($tagDAO->getTagsForEntry($id) as $tag) { - if (!empty($tag['checked'])) { - $this->view->tags[] = $tag['id']; - } + $tagsForEntries = $tagDAO->getTagsForEntries($ids); + $tags = array(); + foreach ($tagsForEntries as $line) { + $tags['t_' . $line['id_tag']][] = $line['id_entry']; } + $this->view->tags = $tags; } if (!$this->ajax) { |
