diff options
author | Thomas Citharel <tcit@tcit.fr> | 2015-01-23 16:34:56 +0100 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2015-01-23 16:34:56 +0100 |
commit | 121691e90026dcfaaecef0a1db07d40cd43a9278 (patch) | |
tree | 43e5f079b926c7c79b265c1453c90a12c6f0486b /inc/poche/Routing.class.php | |
parent | cdde19d6096c85a3ed9b9399482bcc04bb79583c (diff) | |
download | wallabag-121691e90026dcfaaecef0a1db07d40cd43a9278.tar.gz wallabag-121691e90026dcfaaecef0a1db07d40cd43a9278.tar.zst wallabag-121691e90026dcfaaecef0a1db07d40cd43a9278.zip |
working on registration support
Diffstat (limited to 'inc/poche/Routing.class.php')
-rwxr-xr-x | inc/poche/Routing.class.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/inc/poche/Routing.class.php b/inc/poche/Routing.class.php index be06a433..8d6abefd 100755 --- a/inc/poche/Routing.class.php +++ b/inc/poche/Routing.class.php | |||
@@ -67,6 +67,12 @@ class Routing | |||
67 | $this->wallabag->action($this->action, $this->url, $this->id); | 67 | $this->wallabag->action($this->action, $this->url, $this->id); |
68 | $tplFile = Tools::getTplFile($this->view); | 68 | $tplFile = Tools::getTplFile($this->view); |
69 | $tplVars = array_merge($this->vars, $this->wallabag->displayView($this->view, $this->id)); | 69 | $tplVars = array_merge($this->vars, $this->wallabag->displayView($this->view, $this->id)); |
70 | } elseif(ALLOW_REGISTER && isset($_GET['registerform'])) { | ||
71 | Tools::logm('register'); | ||
72 | $tplFile = Tools::getTplFile('register'); | ||
73 | } elseif (ALLOW_REGISTER && isset($_GET['register'])){ | ||
74 | $this->wallabag->createNewUser($_POST['newusername'], $_POST['password4newuser']); | ||
75 | Tools::redirect(); | ||
70 | } elseif(isset($_SERVER['PHP_AUTH_USER'])) { | 76 | } elseif(isset($_SERVER['PHP_AUTH_USER'])) { |
71 | if($this->wallabag->store->userExists($_SERVER['PHP_AUTH_USER'])) { | 77 | if($this->wallabag->store->userExists($_SERVER['PHP_AUTH_USER'])) { |
72 | $this->wallabag->login($this->referer); | 78 | $this->wallabag->login($this->referer); |
@@ -104,7 +110,9 @@ class Routing | |||
104 | $tag_id = (isset($_GET['tag_id']) ? intval($_GET['tag_id']) : 0); | 110 | $tag_id = (isset($_GET['tag_id']) ? intval($_GET['tag_id']) : 0); |
105 | $limit = (isset($_GET['limit']) ? intval($_GET['limit']) : 0); | 111 | $limit = (isset($_GET['limit']) ? intval($_GET['limit']) : 0); |
106 | $this->wallabag->generateFeeds($_GET['token'], filter_var($_GET['user_id'],FILTER_SANITIZE_NUMBER_INT), $tag_id, $_GET['type'], $limit); | 112 | $this->wallabag->generateFeeds($_GET['token'], filter_var($_GET['user_id'],FILTER_SANITIZE_NUMBER_INT), $tag_id, $_GET['type'], $limit); |
107 | } | 113 | } //elseif (ALLOW_REGISTER && isset($_GET['register'])) { |
114 | //$this->wallabag->register | ||
115 | //} | ||
108 | 116 | ||
109 | //allowed ONLY to logged in user | 117 | //allowed ONLY to logged in user |
110 | if (\Session::isLogged() === true) | 118 | if (\Session::isLogged() === true) |