From 538cdfa8839ca9a3d0bfe9b1a89af8e125aa3490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Wed, 31 Jul 2013 19:37:14 +0200 Subject: [PATCH] fix #70: if demo mode, fields are filled --- inc/config.php | 4 ++-- index.php | 4 +++- tpl/login.html | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/inc/config.php b/inc/config.php index bd9287fe1..a21b388d1 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 0a778d084..5de8f7f03 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 69c17a551..6db742c3d 100644 --- a/tpl/login.html +++ b/tpl/login.html @@ -9,11 +9,11 @@

login to your poche

- +
- +