]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - inc/poche/Poche.class.php
Add a autoclose parameters. When we use sharing method in plugins like the tiny tiny...
[github/wallabag/wallabag.git] / inc / poche / Poche.class.php
index 39d43761f44cdaf0b5d2b9e18c8819148d5dc50e..5d807268e3a48f36b386537dca8fc0640d1531b3 100644 (file)
@@ -327,7 +327,7 @@ class Poche
     /**
      * Call action (mark as fav, archive, delete, etc.)
      */
-    public function action($action, Url $url, $id = 0, $import = FALSE)
+    public function action($action, Url $url, $id = 0, $import = FALSE, $autoclose = FALSE)
     {
         switch ($action)
         {
@@ -358,7 +358,11 @@ class Poche
                 }
 
                 if (!$import) {
-                    Tools::redirect('?view=home');
+                    if ($autoclose == TRUE) {
+                      Tools::redirect('?view=home');
+                    } else {
+                      Tools::redirect('?view=home&autoclose=true');
+                    }
                 }
                 break;
             case 'delete':