aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche
diff options
context:
space:
mode:
Diffstat (limited to 'inc/poche')
-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;