X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=inc%2Fpoche%2FRouting.class.php;h=709831d501c405de05619773399499ef8e6da3e9;hb=1c91178932cd5b48d793261c6631697186853a93;hp=44b0e1683ac48f6dea8c9cebfca1d7a7b275d0f0;hpb=9f86454b48dec3c9ecfee8da224112eef0f61441;p=github%2Fwallabag%2Fwallabag.git diff --git a/inc/poche/Routing.class.php b/inc/poche/Routing.class.php index 44b0e168..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'])) { @@ -102,7 +103,8 @@ class Routing $this->wallabag->login($this->referer); } elseif (isset($_GET['feed']) && isset($_GET['user_id'])) { $tag_id = (isset($_GET['tag_id']) ? intval($_GET['tag_id']) : 0); - $this->wallabag->generateFeeds($_GET['token'], filter_var($_GET['user_id'],FILTER_SANITIZE_NUMBER_INT), $tag_id, $_GET['type']); + $limit = (isset($_GET['limit']) ? intval($_GET['limit']) : 0); + $this->wallabag->generateFeeds($_GET['token'], filter_var($_GET['user_id'],FILTER_SANITIZE_NUMBER_INT), $tag_id, $_GET['type'], $limit); } //allowed ONLY to logged in user @@ -115,7 +117,7 @@ class Routing // update password $this->wallabag->updatePassword($_POST['password'], $_POST['password_repeat']); } elseif (isset($_GET['newuser'])) { - $this->wallabag->createNewUser($_POST['newusername'], $_POST['password4newuser']); + $this->wallabag->createNewUser($_POST['newusername'], $_POST['password4newuser'], $_POST['newuseremail']); } elseif (isset($_GET['deluser'])) { $this->wallabag->deleteUser($_POST['password4deletinguser']); } elseif (isset($_GET['epub'])) { @@ -157,4 +159,4 @@ class Routing { echo $this->wallabag->tpl->render($file, $vars); } -} \ No newline at end of file +}