diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2013-07-31 17:19:50 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2013-07-31 17:19:50 +0200 |
commit | 85ebc80c7eaf88e4d57a52adb8e4c32d8cc34b64 (patch) | |
tree | 0012345c93b1fe8a242963bede0db370598d6f2b /inc/config.php | |
parent | 6588517b2d46cbc524260758d1fafd92b19ab681 (diff) | |
parent | 6d37de5f828b700843567a91418671919eed4be4 (diff) | |
download | wallabag-85ebc80c7eaf88e4d57a52adb8e4c32d8cc34b64.tar.gz wallabag-85ebc80c7eaf88e4d57a52adb8e4c32d8cc34b64.tar.zst wallabag-85ebc80c7eaf88e4d57a52adb8e4c32d8cc34b64.zip |
Merge branch 'dev'0.3
Diffstat (limited to 'inc/config.php')
-rw-r--r-- | inc/config.php | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/inc/config.php b/inc/config.php index 8bafd595..bd9287fe 100644 --- a/inc/config.php +++ b/inc/config.php | |||
@@ -14,9 +14,12 @@ if (!is_dir('db/')) { | |||
14 | @mkdir('db/',0705); | 14 | @mkdir('db/',0705); |
15 | } | 15 | } |
16 | 16 | ||
17 | define ('MODE_DEMO', FALSE); | ||
17 | define ('ABS_PATH', 'assets/'); | 18 | define ('ABS_PATH', 'assets/'); |
18 | define ('CONVERT_LINKS_FOOTNOTES', TRUE); | 19 | define ('CONVERT_LINKS_FOOTNOTES', TRUE); |
20 | define ('REVERT_FORCED_PARAGRAPH_ELEMENTS',FALSE); | ||
19 | define ('DOWNLOAD_PICTURES', TRUE); | 21 | define ('DOWNLOAD_PICTURES', TRUE); |
22 | define ('SALT', '464v54gLLw928uz4zUBqkRJeiPY68zCX'); | ||
20 | $storage_type = 'sqlite'; # sqlite or file | 23 | $storage_type = 'sqlite'; # sqlite or file |
21 | 24 | ||
22 | include 'functions.php'; | 25 | include 'functions.php'; |
@@ -32,9 +35,7 @@ require_once 'class.messages.php'; | |||
32 | 35 | ||
33 | Session::init(); | 36 | Session::init(); |
34 | 37 | ||
35 | $store = new $storage_type(); | 38 | $store = new $storage_type(); |
36 | $msg = new Messages(); | ||
37 | |||
38 | # initialisation de RainTPL | 39 | # initialisation de RainTPL |
39 | raintpl::$tpl_dir = './tpl/'; | 40 | raintpl::$tpl_dir = './tpl/'; |
40 | raintpl::$cache_dir = './cache/'; | 41 | raintpl::$cache_dir = './cache/'; |
@@ -42,4 +43,24 @@ raintpl::$base_url = get_poche_url(); | |||
42 | raintpl::configure('path_replace', false); | 43 | raintpl::configure('path_replace', false); |
43 | raintpl::configure('debug', false); | 44 | raintpl::configure('debug', false); |
44 | $tpl = new raintpl(); | 45 | $tpl = new raintpl(); |
46 | |||
47 | if(!$store->isInstalled()) | ||
48 | { | ||
49 | logm('poche still not installed'); | ||
50 | $tpl->draw('install'); | ||
51 | if (isset($_GET['install'])) { | ||
52 | if (($_POST['password'] == $_POST['password_repeat']) | ||
53 | && $_POST['password'] != "" && $_POST['login'] != "") { | ||
54 | $store->install($_POST['login'], encode_string($_POST['password'] . $_POST['login'])); | ||
55 | Session::logout(); | ||
56 | MyTool::redirect(); | ||
57 | } | ||
58 | } | ||
59 | exit(); | ||
60 | } | ||
61 | |||
62 | $_SESSION['login'] = (isset ($_SESSION['login'])) ? $_SESSION['login'] : $store->getLogin(); | ||
63 | $_SESSION['pass'] = (isset ($_SESSION['pass'])) ? $_SESSION['pass'] : $store->getPassword(); | ||
64 | |||
65 | $msg = new Messages(); | ||
45 | $tpl->assign('msg', $msg); \ No newline at end of file | 66 | $tpl->assign('msg', $msg); \ No newline at end of file |