aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-08-02 23:04:24 +0200
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-08-02 23:04:24 +0200
commit161395d7098ec2bd86671d15d5b54f39148e2d5b (patch)
tree60d63ffd57a84315d746f2a705b19ea6e60d090c /index.php
parent5ffe5cf541d0d1c7524537b034d0cde3da18f6e7 (diff)
downloadwallabag-161395d7098ec2bd86671d15d5b54f39148e2d5b.tar.gz
wallabag-161395d7098ec2bd86671d15d5b54f39148e2d5b.tar.zst
wallabag-161395d7098ec2bd86671d15d5b54f39148e2d5b.zip
mv pochetool pochetools
Diffstat (limited to 'index.php')
-rw-r--r--index.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/index.php b/index.php
index 78daaaf9..4962639b 100644
--- a/index.php
+++ b/index.php
@@ -10,7 +10,7 @@
10 10
11include dirname(__FILE__).'/inc/config.php'; 11include dirname(__FILE__).'/inc/config.php';
12 12
13pocheTool::initPhp(); 13pocheTools::initPhp();
14 14
15# XSRF protection with token 15# XSRF protection with token
16if (!empty($_POST)) { 16if (!empty($_POST)) {
@@ -26,7 +26,7 @@ if (isset($_GET['login'])) {
26 // Login 26 // Login
27 if (!empty($_POST['login']) && !empty($_POST['password'])) { 27 if (!empty($_POST['login']) && !empty($_POST['password'])) {
28 if (Session::login($_SESSION['login'], $_SESSION['pass'], $_POST['login'], encode_string($_POST['password'] . $_POST['login']))) { 28 if (Session::login($_SESSION['login'], $_SESSION['pass'], $_POST['login'], encode_string($_POST['password'] . $_POST['login']))) {
29 pocheTool::logm('login successful'); 29 pocheTools::logm('login successful');
30 if (!empty($_POST['longlastingsession'])) { 30 if (!empty($_POST['longlastingsession'])) {
31 $_SESSION['longlastingsession'] = 31536000; 31 $_SESSION['longlastingsession'] = 31536000;
32 $_SESSION['expires_on'] = time() + $_SESSION['longlastingsession']; 32 $_SESSION['expires_on'] = time() + $_SESSION['longlastingsession'];
@@ -36,23 +36,23 @@ if (isset($_GET['login'])) {
36 } 36 }
37 session_regenerate_id(true); 37 session_regenerate_id(true);
38 38
39 pocheTool::redirect($referer); 39 pocheTools::redirect($referer);
40 } 40 }
41 pocheTool::logm('login failed'); 41 pocheTools::logm('login failed');
42 die(_("Login failed !")); 42 die(_("Login failed !"));
43 } else { 43 } else {
44 pocheTool::logm('login failed'); 44 pocheTools::logm('login failed');
45 } 45 }
46} 46}
47elseif (isset($_GET['logout'])) { 47elseif (isset($_GET['logout'])) {
48 pocheTool::logm('logout'); 48 pocheTools::logm('logout');
49 Session::logout(); 49 Session::logout();
50 pocheTool::redirect(); 50 pocheTools::redirect();
51} 51}
52elseif (isset($_GET['config'])) { 52elseif (isset($_GET['config'])) {
53 if (isset($_POST['password']) && isset($_POST['password_repeat'])) { 53 if (isset($_POST['password']) && isset($_POST['password_repeat'])) {
54 if ($_POST['password'] == $_POST['password_repeat'] && $_POST['password'] != "") { 54 if ($_POST['password'] == $_POST['password_repeat'] && $_POST['password'] != "") {
55 pocheTool::logm('password updated'); 55 pocheTools::logm('password updated');
56 if (!MODE_DEMO) { 56 if (!MODE_DEMO) {
57 $store->updatePassword(encode_string($_POST['password'] . $_SESSION['login'])); 57 $store->updatePassword(encode_string($_POST['password'] . $_SESSION['login']));
58 #your password has been updated 58 #your password has been updated
@@ -78,7 +78,7 @@ $tpl_vars = array(
78 'isLogged' => Session::isLogged(), 78 'isLogged' => Session::isLogged(),
79 'referer' => $referer, 79 'referer' => $referer,
80 'view' => $view, 80 'view' => $view,
81 'poche_url' => pocheTool::getUrl(), 81 'poche_url' => pocheTools::getUrl(),
82 'demo' => MODE_DEMO, 82 'demo' => MODE_DEMO,
83 'title' => _('poche, a read it later open source system'), 83 'title' => _('poche, a read it later open source system'),
84); 84);