From: Nicolas LÅ“uillet Date: Wed, 31 Jul 2013 17:37:14 +0000 (+0200) Subject: fix #70: if demo mode, fields are filled X-Git-Tag: 1.0-beta1~10 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=538cdfa8839ca9a3d0bfe9b1a89af8e125aa3490;p=github%2Fwallabag%2Fwallabag.git fix #70: if demo mode, fields are filled --- diff --git a/inc/config.php b/inc/config.php index bd9287fe..a21b388d 100644 --- a/inc/config.php +++ b/inc/config.php @@ -8,13 +8,13 @@ * @license http://www.wtfpl.net/ see COPYING file */ -define ('POCHE_VERSION', '0.2.1'); +define ('POCHE_VERSION', '0.3'); if (!is_dir('db/')) { @mkdir('db/',0705); } -define ('MODE_DEMO', FALSE); +define ('MODE_DEMO', TRUE); define ('ABS_PATH', 'assets/'); define ('CONVERT_LINKS_FOOTNOTES', TRUE); define ('REVERT_FORCED_PARAGRAPH_ELEMENTS',FALSE); diff --git a/index.php b/index.php index 0a778d08..5de8f7f0 100644 --- a/index.php +++ b/index.php @@ -54,7 +54,7 @@ elseif (isset($_GET['config'])) { if (isset($_POST['password']) && isset($_POST['password_repeat'])) { if ($_POST['password'] == $_POST['password_repeat'] && $_POST['password'] != "") { logm('password updated'); - if (!DEMO) { + if (!MODE_DEMO) { $store->updatePassword(encode_string($_POST['password'] . $_SESSION['login'])); $msg->add('s', 'your password has been updated'); } @@ -79,6 +79,7 @@ $tpl->assign('isLogged', Session::isLogged()); $tpl->assign('referer', $ref); $tpl->assign('view', $view); $tpl->assign('poche_url', myTool::getUrl()); +$tpl->assign('demo', MODE_DEMO); $tpl->assign('title', 'poche, a read it later open source system'); if (Session::isLogged()) { @@ -86,5 +87,6 @@ if (Session::isLogged()) { display_view($view, $id, $full_head); } else { + $tpl->draw('login'); } diff --git a/tpl/login.html b/tpl/login.html index 69c17a55..6db742c3 100644 --- a/tpl/login.html +++ b/tpl/login.html @@ -9,11 +9,11 @@

login to your poche

- +
- +