aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/entryController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2018-12-29 11:33:31 +0100
committerGravatar GitHub <noreply@github.com> 2018-12-29 11:33:31 +0100
commita0f1b76918e7ce038ab8ea490d9f5ed0e625831e (patch)
tree1bdd359b245ac3841b742ece6800de776dd66a4c /app/Controllers/entryController.php
parent92de09bac41d320decb31e6caf2e9b78fab484f7 (diff)
parentf9555db678679d04fdc28bb2d31eb00135209a16 (diff)
Merge pull request #2199 from Alkarex/batch-scroll-as-read
Batch scroll as read + reducing jQuery
Diffstat (limited to 'app/Controllers/entryController.php')
-rwxr-xr-xapp/Controllers/entryController.php13
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) {