aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Poche.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/poche/Poche.class.php')
-rw-r--r--inc/poche/Poche.class.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index 0766cd51..3ecaf084 100644
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -327,7 +327,7 @@ class Poche
327 /** 327 /**
328 * Call action (mark as fav, archive, delete, etc.) 328 * Call action (mark as fav, archive, delete, etc.)
329 */ 329 */
330 public function action($action, Url $url, $id = 0, $import = FALSE) 330 public function action($action, Url $url, $id = 0, $import = FALSE, $autoclose = FALSE)
331 { 331 {
332 switch ($action) 332 switch ($action)
333 { 333 {
@@ -358,7 +358,11 @@ class Poche
358 } 358 }
359 359
360 if (!$import) { 360 if (!$import) {
361 Tools::redirect('?view=home'); 361 if ($autoclose == TRUE) {
362 Tools::redirect('?view=home');
363 } else {
364 Tools::redirect('?view=home&closewin=true');
365 }
362 } 366 }
363 break; 367 break;
364 case 'delete': 368 case 'delete':
@@ -374,7 +378,7 @@ class Poche
374 $msg = 'error : can\'t delete link #' . $id; 378 $msg = 'error : can\'t delete link #' . $id;
375 } 379 }
376 Tools::logm($msg); 380 Tools::logm($msg);
377 Tools::redirect(); 381 Tools::redirect('?');
378 break; 382 break;
379 case 'toggle_fav' : 383 case 'toggle_fav' :
380 $this->store->favoriteById($id, $this->user->getId()); 384 $this->store->favoriteById($id, $this->user->getId());