aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc
diff options
context:
space:
mode:
authormoparisthebest <admin@moparisthebest.com>2015-01-12 19:52:41 -0500
committermoparisthebest <admin@moparisthebest.com>2015-01-12 19:52:41 -0500
commit13c7f9a462b71e89d5e252b693fc7d00aca249ec (patch)
treeeb85531a6bdd00495e4aab5f3493e34984a7dfbf /inc
parent512e5e5bd195ea4547dc7fa29f34a9d205bd7a54 (diff)
downloadwallabag-13c7f9a462b71e89d5e252b693fc7d00aca249ec.tar.gz
wallabag-13c7f9a462b71e89d5e252b693fc7d00aca249ec.tar.zst
wallabag-13c7f9a462b71e89d5e252b693fc7d00aca249ec.zip
Add ability to mark all articles from a tag as read
Diffstat (limited to 'inc')
-rwxr-xr-xinc/poche/Poche.class.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index 540aa55e..20897c61 100755
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -240,8 +240,21 @@ class Poche
240 } 240 }
241 break; 241 break;
242 case 'toggle_archive' : 242 case 'toggle_archive' :
243 $this->store->archiveById($id, $this->user->getId()); 243 if (isset($_GET['tag_id'])) {
244 Tools::logm('archive link #' . $id); 244 //when we want to archive a whole tag
245 $tag_id = $_GET['tag_id'];
246 $allentry_ids = $this->store->retrieveEntriesByTag($tag_id, $this->user->getId());
247 $entry_ids = array();
248 foreach ($allentry_ids as $eachentry) {
249 $entry_ids[] = $eachentry[0];
250 }
251 } else { //archive a single article
252 $entry_ids = array($id);
253 }
254 foreach($entry_ids as $id) {
255 $this->store->archiveById($id, $this->user->getId());
256 Tools::logm('archive link #' . $id);
257 }
245 if ( Tools::isAjaxRequest() ) { 258 if ( Tools::isAjaxRequest() ) {
246 echo 1; 259 echo 1;
247 exit; 260 exit;