From 1c91178932cd5b48d793261c6631697186853a93 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 4 Feb 2015 23:37:37 +0100 Subject: fix autoclose (#984) and bookmarklet mode --- inc/poche/Poche.class.php | 4 ++-- inc/poche/Routing.class.php | 3 ++- themes/baggy/config.twig | 2 +- themes/default/config.twig | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index f9928145..a601f0a8 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -195,9 +195,9 @@ class Poche } if ($autoclose == TRUE) { - Tools::redirect('?view=home'); + Tools::redirect('?view=home&closewin=true'); } else { - Tools::redirect('?view=home&closewin=true'); + Tools::redirect('?view=home'); } return $last_id; break; diff --git a/inc/poche/Routing.class.php b/inc/poche/Routing.class.php index a8d00b89..709831d5 100755 --- a/inc/poche/Routing.class.php +++ b/inc/poche/Routing.class.php @@ -33,6 +33,7 @@ class Routing $this->view = Tools::checkVar('view', 'home'); $this->action = Tools::checkVar('action'); $this->id = Tools::checkVar('id'); + $this->autoclose = Tools::checkVar('autoclose',FALSE); $_SESSION['sort'] = Tools::checkVar('sort', 'id'); $this->url = new Url((isset ($_GET['url'])) ? $_GET['url'] : ''); } @@ -64,7 +65,7 @@ class Routing $tplVars = array(); if (\Session::isLogged()) { - $this->wallabag->action($this->action, $this->url, $this->id); + $this->wallabag->action($this->action, $this->url, $this->id, FALSE, $this->autoclose); $tplFile = Tools::getTplFile($this->view); $tplVars = array_merge($this->vars, $this->wallabag->displayView($this->view, $this->id)); } elseif(isset($_SERVER['PHP_AUTH_USER'])) { diff --git a/themes/baggy/config.twig b/themes/baggy/config.twig index a5a61559..95e09734 100755 --- a/themes/baggy/config.twig +++ b/themes/baggy/config.twig @@ -27,7 +27,7 @@

{% trans "Bookmarklet" %}

- {% trans "Drag & drop this link to your bookmarks bar:" %} {% trans "bag it!" %} + {% trans "Drag & drop this link to your bookmarks bar:" %} {% trans "bag it!" %}

{% trans "Feeds" %}

diff --git a/themes/default/config.twig b/themes/default/config.twig index bac563cf..87f964c9 100755 --- a/themes/default/config.twig +++ b/themes/default/config.twig @@ -27,7 +27,7 @@

{% trans "Bookmarklet" %}

- {% trans "Drag & drop this link to your bookmarks bar:" %} {% trans "bag it!" %} + {% trans "Drag & drop this link to your bookmarks bar:" %} {% trans "bag it!" %}

{% trans "Feeds" %}

-- cgit v1.2.3