aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--[-rwxr-xr-x]img/messages/close.pngbin662 -> 662 bytes
-rw-r--r--[-rwxr-xr-x]img/messages/cross.pngbin655 -> 655 bytes
-rw-r--r--[-rwxr-xr-x]img/messages/help.pngbin786 -> 786 bytes
-rw-r--r--[-rwxr-xr-x]img/messages/tick.pngbin537 -> 537 bytes
-rw-r--r--[-rwxr-xr-x]img/messages/warning.pngbin666 -> 666 bytes
-rw-r--r--inc/config.php1
-rw-r--r--inc/store/sqlite.class.php7
-rw-r--r--index.php11
8 files changed, 15 insertions, 4 deletions
diff --git a/img/messages/close.png b/img/messages/close.png
index 731aa018..731aa018 100755..100644
--- a/img/messages/close.png
+++ b/img/messages/close.png
Binary files differ
diff --git a/img/messages/cross.png b/img/messages/cross.png
index 1514d51a..1514d51a 100755..100644
--- a/img/messages/cross.png
+++ b/img/messages/cross.png
Binary files differ
diff --git a/img/messages/help.png b/img/messages/help.png
index 5c870176..5c870176 100755..100644
--- a/img/messages/help.png
+++ b/img/messages/help.png
Binary files differ
diff --git a/img/messages/tick.png b/img/messages/tick.png
index a9925a06..a9925a06 100755..100644
--- a/img/messages/tick.png
+++ b/img/messages/tick.png
Binary files differ
diff --git a/img/messages/warning.png b/img/messages/warning.png
index 628cf2da..628cf2da 100755..100644
--- a/img/messages/warning.png
+++ b/img/messages/warning.png
Binary files differ
diff --git a/inc/config.php b/inc/config.php
index 2de725f4..bd9287fe 100644
--- a/inc/config.php
+++ b/inc/config.php
@@ -14,6 +14,7 @@ if (!is_dir('db/')) {
14 @mkdir('db/',0705); 14 @mkdir('db/',0705);
15} 15}
16 16
17define ('MODE_DEMO', FALSE);
17define ('ABS_PATH', 'assets/'); 18define ('ABS_PATH', 'assets/');
18define ('CONVERT_LINKS_FOOTNOTES', TRUE); 19define ('CONVERT_LINKS_FOOTNOTES', TRUE);
19define ('REVERT_FORCED_PARAGRAPH_ELEMENTS',FALSE); 20define ('REVERT_FORCED_PARAGRAPH_ELEMENTS',FALSE);
diff --git a/inc/store/sqlite.class.php b/inc/store/sqlite.class.php
index 4bfbb29e..21081608 100644
--- a/inc/store/sqlite.class.php
+++ b/inc/store/sqlite.class.php
@@ -74,6 +74,13 @@ class Sqlite extends Store {
74 return isset($pass[0]['value']) ? $pass[0]['value'] : FALSE; 74 return isset($pass[0]['value']) ? $pass[0]['value'] : FALSE;
75 } 75 }
76 76
77 public function updatePassword($password)
78 {
79 $sql_update = "UPDATE config SET value=? WHERE name='password'";
80 $params_update = array($password);
81 $query = $this->executeQuery($sql_update, $params_update);
82 }
83
77 private function executeQuery($sql, $params) { 84 private function executeQuery($sql, $params) {
78 try 85 try
79 { 86 {
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