aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Routing.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/poche/Routing.class.php')
-rwxr-xr-xinc/poche/Routing.class.php16
1 files changed, 3 insertions, 13 deletions
diff --git a/inc/poche/Routing.class.php b/inc/poche/Routing.class.php
index 177b74d5..fb37a838 100755
--- a/inc/poche/Routing.class.php
+++ b/inc/poche/Routing.class.php
@@ -15,6 +15,7 @@ class Routing
15 protected $view; 15 protected $view;
16 protected $action; 16 protected $action;
17 protected $id; 17 protected $id;
18 protected $autoclose;
18 protected $url; 19 protected $url;
19 protected $file; 20 protected $file;
20 protected $defaultVars = array(); 21 protected $defaultVars = array();
@@ -74,15 +75,6 @@ class Routing
74 } elseif (ALLOW_REGISTER && isset($_GET['register'])){ 75 } elseif (ALLOW_REGISTER && isset($_GET['register'])){
75 $this->wallabag->createNewUser($_POST['newusername'], $_POST['password4newuser'], $_POST['newuseremail']); 76 $this->wallabag->createNewUser($_POST['newusername'], $_POST['password4newuser'], $_POST['newuseremail']);
76 Tools::redirect(); 77 Tools::redirect();
77 } elseif(isset($_SERVER['PHP_AUTH_USER'])) {
78 if($this->wallabag->store->userExists($_SERVER['PHP_AUTH_USER'])) {
79 $this->wallabag->login($this->referer);
80 } else {
81 $this->wallabag->messages->add('e', _('login failed: user doesn\'t exist'));
82 Tools::logm('user doesn\'t exist');
83 $tplFile = Tools::getTplFile('login');
84 $tplVars['http_auth'] = 1;
85 }
86 } elseif(isset($_SERVER['REMOTE_USER'])) { 78 } elseif(isset($_SERVER['REMOTE_USER'])) {
87 if($this->wallabag->store->userExists($_SERVER['REMOTE_USER'])) { 79 if($this->wallabag->store->userExists($_SERVER['REMOTE_USER'])) {
88 $this->wallabag->login($this->referer); 80 $this->wallabag->login($this->referer);
@@ -111,9 +103,7 @@ class Routing
111 $tag_id = (isset($_GET['tag_id']) ? intval($_GET['tag_id']) : 0); 103 $tag_id = (isset($_GET['tag_id']) ? intval($_GET['tag_id']) : 0);
112 $limit = (isset($_GET['limit']) ? intval($_GET['limit']) : 0); 104 $limit = (isset($_GET['limit']) ? intval($_GET['limit']) : 0);
113 $this->wallabag->generateFeeds($_GET['token'], filter_var($_GET['user_id'],FILTER_SANITIZE_NUMBER_INT), $tag_id, $_GET['type'], $limit); 105 $this->wallabag->generateFeeds($_GET['token'], filter_var($_GET['user_id'],FILTER_SANITIZE_NUMBER_INT), $tag_id, $_GET['type'], $limit);
114 } //elseif (ALLOW_REGISTER && isset($_GET['register'])) { 106 }
115 //$this->wallabag->register
116 //}
117 107
118 //allowed ONLY to logged in user 108 //allowed ONLY to logged in user
119 if (\Session::isLogged() === true) 109 if (\Session::isLogged() === true)
@@ -142,7 +132,7 @@ class Routing
142 $pdf->producePDF(); 132 $pdf->producePDF();
143 } elseif (isset($_GET['import'])) { 133 } elseif (isset($_GET['import'])) {
144 $import = $this->wallabag->import(); 134 $import = $this->wallabag->import();
145 $tplVars = array_merge($this->vars, $import); 135 $this->vars = array_merge($this->vars, $import);
146 } elseif (isset($_GET['empty-cache'])) { 136 } elseif (isset($_GET['empty-cache'])) {
147 Tools::emptyCache(); 137 Tools::emptyCache();
148 } elseif (isset($_GET['export'])) { 138 } elseif (isset($_GET['export'])) {