diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2014-07-12 19:01:11 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2014-07-12 19:01:11 +0200 |
commit | 2f26729c841a68669a1baf799091cb2c6c9f585a (patch) | |
tree | e1e388bb73c7533aad85bf1f672f867b62b247e4 /inc/poche/Routing.class.php | |
parent | b6a3c8866a4cb88b009e7ba45c5e223e0fdae188 (diff) | |
download | wallabag-2f26729c841a68669a1baf799091cb2c6c9f585a.tar.gz wallabag-2f26729c841a68669a1baf799091cb2c6c9f585a.tar.zst wallabag-2f26729c841a68669a1baf799091cb2c6c9f585a.zip |
Refactor
Diffstat (limited to 'inc/poche/Routing.class.php')
-rw-r--r-- | inc/poche/Routing.class.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/inc/poche/Routing.class.php b/inc/poche/Routing.class.php index 8c2f38e3..eb4c4d90 100644 --- a/inc/poche/Routing.class.php +++ b/inc/poche/Routing.class.php | |||
@@ -105,20 +105,21 @@ class Routing | |||
105 | $this->wallabag->logout(); | 105 | $this->wallabag->logout(); |
106 | } elseif (isset($_GET['config'])) { | 106 | } elseif (isset($_GET['config'])) { |
107 | // update password | 107 | // update password |
108 | $this->wallabag->updatePassword(); | 108 | $this->wallabag->updatePassword($_POST['password'], $_POST['password_repeat']); |
109 | } elseif (isset($_GET['newuser'])) { | 109 | } elseif (isset($_GET['newuser'])) { |
110 | $this->wallabag->createNewUser(); | 110 | $this->wallabag->createNewUser($_POST['newusername'], $_POST['password4newuser']); |
111 | } elseif (isset($_GET['deluser'])) { | 111 | } elseif (isset($_GET['deluser'])) { |
112 | $this->wallabag->deleteUser(); | 112 | $this->wallabag->deleteUser($_POST['password4deletinguser']); |
113 | } elseif (isset($_GET['epub'])) { | 113 | } elseif (isset($_GET['epub'])) { |
114 | $this->wallabag->createEpub(); | 114 | $epub = new WallabagEpub($this->wallabag, $_GET['method'], $_GET['id'], $_GET['value']); |
115 | $epub->run(); | ||
115 | } elseif (isset($_GET['import'])) { | 116 | } elseif (isset($_GET['import'])) { |
116 | $import = $this->wallabag->import(); | 117 | $import = $this->wallabag->import(); |
117 | $tplVars = array_merge($this->vars, $import); | 118 | $tplVars = array_merge($this->vars, $import); |
118 | } elseif (isset($_GET['download'])) { | 119 | } elseif (isset($_GET['download'])) { |
119 | Tools::downloadDb(); | 120 | Tools::downloadDb(); |
120 | } elseif (isset($_GET['empty-cache'])) { | 121 | } elseif (isset($_GET['empty-cache'])) { |
121 | $this->wallabag->emptyCache(); | 122 | Tools::emptyCache(); |
122 | } elseif (isset($_GET['export'])) { | 123 | } elseif (isset($_GET['export'])) { |
123 | $this->wallabag->export(); | 124 | $this->wallabag->export(); |
124 | } elseif (isset($_GET['updatetheme'])) { | 125 | } elseif (isset($_GET['updatetheme'])) { |
@@ -129,7 +130,7 @@ class Routing | |||
129 | $this->wallabag->uploadFile(); | 130 | $this->wallabag->uploadFile(); |
130 | } elseif (isset($_GET['feed'])) { | 131 | } elseif (isset($_GET['feed'])) { |
131 | if (isset($_GET['action']) && $_GET['action'] == 'generate') { | 132 | if (isset($_GET['action']) && $_GET['action'] == 'generate') { |
132 | $this->wallabag->generateToken(); | 133 | $this->wallabag->updateToken(); |
133 | } | 134 | } |
134 | else { | 135 | else { |
135 | $tag_id = (isset($_GET['tag_id']) ? intval($_GET['tag_id']) : 0); | 136 | $tag_id = (isset($_GET['tag_id']) ? intval($_GET['tag_id']) : 0); |