aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorNicolas Lœuillet <nicolas@loeuillet.org>2013-06-01 08:29:37 +0200
committerNicolas Lœuillet <nicolas@loeuillet.org>2013-06-01 08:29:37 +0200
commit6499b26ae8e148fa5481db5b7a4e9fc0e55aad94 (patch)
tree4974d01d7813d78ae9760332cba3006aaffc20c4 /index.php
parentda368cc84f4d79afc30052a209502fa8fd17241e (diff)
downloadwallabag-6499b26ae8e148fa5481db5b7a4e9fc0e55aad94.tar.gz
wallabag-6499b26ae8e148fa5481db5b7a4e9fc0e55aad94.tar.zst
wallabag-6499b26ae8e148fa5481db5b7a4e9fc0e55aad94.zip
demo mode (you can't update password in demo mode
Diffstat (limited to 'index.php')
-rw-r--r--index.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/index.php b/index.php
index 91d0b304..0a778d08 100644
--- a/index.php
+++ b/index.php
@@ -54,14 +54,17 @@ elseif (isset($_GET['config'])) {
54 if (isset($_POST['password']) && isset($_POST['password_repeat'])) { 54 if (isset($_POST['password']) && isset($_POST['password_repeat'])) {
55 if ($_POST['password'] == $_POST['password_repeat'] && $_POST['password'] != "") { 55 if ($_POST['password'] == $_POST['password_repeat'] && $_POST['password'] != "") {
56 logm('password updated'); 56 logm('password updated');
57 $store->updatePassword(encode_string($_POST['password'] . $_SESSION['login'])); 57 if (!DEMO) {
58 $msg->add('s', 'your password has been updated'); 58 $store->updatePassword(encode_string($_POST['password'] . $_SESSION['login']));
59 $msg->add('s', 'your password has been updated');
60 }
61 else {
62 $msg->add('i', 'in demo mode, you can\'t update password');
63 }
59 } 64 }
60 else 65 else
61 $msg->add('e', 'your password can\'t be empty and you have to repeat it in the second field'); 66 $msg->add('e', 'your password can\'t be empty and you have to repeat it in the second field');
62 } 67 }
63 else
64 $msg->add('e', 'error in your password update');
65} 68}
66 69
67# Traitement des paramètres et déclenchement des actions 70# Traitement des paramètres et déclenchement des actions