From 363bc4eb8642d464cc0c099f7ab72a425b56b463 Mon Sep 17 00:00:00 2001 From: banux Date: Sun, 27 Oct 2013 07:37:05 +0100 Subject: Add a autoclose parameters. When we use sharing method in plugins like the tiny tiny rss one or the firefox plugins we can passe the autoclose=true parameters that close the popup. --- inc/poche/Poche.class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 39d43761..5d807268 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -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': -- cgit v1.2.3