From 2987031bc3d30437e7b34c3fe912a0ccbcc87f10 Mon Sep 17 00:00:00 2001 From: nicosomb Date: Tue, 23 Apr 2013 15:25:12 +0200 Subject: Fixed #73 - Can't Poch url with special caracter --- inc/config.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc/config.php') diff --git a/inc/config.php b/inc/config.php index 8bafd595..737f5215 100644 --- a/inc/config.php +++ b/inc/config.php @@ -16,6 +16,7 @@ if (!is_dir('db/')) { define ('ABS_PATH', 'assets/'); define ('CONVERT_LINKS_FOOTNOTES', TRUE); +define ('REVERT_FORCED_PARAGRAPH_ELEMENTS',FALSE); define ('DOWNLOAD_PICTURES', TRUE); $storage_type = 'sqlite'; # sqlite or file -- cgit v1.2.3 From aa8c9f2a32ea75278d52c86c6a3a39d34bce5cc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 31 May 2013 22:55:52 +0200 Subject: Installation mode --- inc/config.php | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'inc/config.php') diff --git a/inc/config.php b/inc/config.php index 737f5215..2de725f4 100644 --- a/inc/config.php +++ b/inc/config.php @@ -18,6 +18,7 @@ define ('ABS_PATH', 'assets/'); define ('CONVERT_LINKS_FOOTNOTES', TRUE); define ('REVERT_FORCED_PARAGRAPH_ELEMENTS',FALSE); define ('DOWNLOAD_PICTURES', TRUE); +define ('SALT', '464v54gLLw928uz4zUBqkRJeiPY68zCX'); $storage_type = 'sqlite'; # sqlite or file include 'functions.php'; @@ -33,9 +34,7 @@ require_once 'class.messages.php'; Session::init(); -$store = new $storage_type(); -$msg = new Messages(); - +$store = new $storage_type(); # initialisation de RainTPL raintpl::$tpl_dir = './tpl/'; raintpl::$cache_dir = './cache/'; @@ -43,4 +42,24 @@ raintpl::$base_url = get_poche_url(); raintpl::configure('path_replace', false); raintpl::configure('debug', false); $tpl = new raintpl(); + +if(!$store->isInstalled()) +{ + logm('poche still not installed'); + $tpl->draw('install'); + if (isset($_GET['install'])) { + if (($_POST['password'] == $_POST['password_repeat']) + && $_POST['password'] != "" && $_POST['login'] != "") { + $store->install($_POST['login'], encode_string($_POST['password'] . $_POST['login'])); + Session::logout(); + MyTool::redirect(); + } + } + exit(); +} + +$_SESSION['login'] = (isset ($_SESSION['login'])) ? $_SESSION['login'] : $store->getLogin(); +$_SESSION['pass'] = (isset ($_SESSION['pass'])) ? $_SESSION['pass'] : $store->getPassword(); + +$msg = new Messages(); $tpl->assign('msg', $msg); \ No newline at end of file -- cgit v1.2.3 From 6499b26ae8e148fa5481db5b7a4e9fc0e55aad94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sat, 1 Jun 2013 08:29:37 +0200 Subject: demo mode (you can't update password in demo mode --- inc/config.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc/config.php') 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/')) { @mkdir('db/',0705); } +define ('MODE_DEMO', FALSE); define ('ABS_PATH', 'assets/'); define ('CONVERT_LINKS_FOOTNOTES', TRUE); define ('REVERT_FORCED_PARAGRAPH_ELEMENTS',FALSE); -- cgit v1.2.3