diff options
Diffstat (limited to 'inc/config.php')
-rw-r--r-- | inc/config.php | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/inc/config.php b/inc/config.php index c63b07b9..9d4b7fae 100644 --- a/inc/config.php +++ b/inc/config.php | |||
@@ -8,26 +8,32 @@ | |||
8 | * @license http://www.wtfpl.net/ see COPYING file | 8 | * @license http://www.wtfpl.net/ see COPYING file |
9 | */ | 9 | */ |
10 | 10 | ||
11 | define ('POCHE_VERSION', '0.11'); | 11 | define ('POCHE_VERSION', '0.2'); |
12 | 12 | ||
13 | if (!is_dir('db/')) { | 13 | if (!is_dir('db/')) { |
14 | @mkdir('db/',0705); | 14 | @mkdir('db/',0705); |
15 | } | 15 | } |
16 | 16 | ||
17 | define ('DB_PATH', 'sqlite:./db/poche.sqlite'); | ||
18 | define ('ABS_PATH', 'assets/'); | 17 | define ('ABS_PATH', 'assets/'); |
19 | define ('CONVERT_LINKS_FOOTNOTES', TRUE); | 18 | define ('CONVERT_LINKS_FOOTNOTES', TRUE); |
20 | define ('DOWNLOAD_PICTURES', TRUE); | 19 | define ('DOWNLOAD_PICTURES', TRUE); |
20 | $storage_type = 'sqlite'; # sqlite or file | ||
21 | 21 | ||
22 | include 'db.php'; | ||
23 | include 'functions.php'; | 22 | include 'functions.php'; |
24 | require_once 'Readability.php'; | 23 | require_once 'Readability.php'; |
25 | require_once 'Encoding.php'; | 24 | require_once 'Encoding.php'; |
26 | require_once 'rain.tpl.class.php'; | 25 | require_once 'rain.tpl.class.php'; |
27 | require_once 'MyTool.class.php'; | 26 | require_once 'MyTool.class.php'; |
28 | require_once 'Session.class.php'; | 27 | require_once 'Session.class.php'; |
28 | require_once 'store/store.class.php'; | ||
29 | require_once 'store/sqlite.class.php'; | ||
30 | require_once 'store/file.class.php'; | ||
31 | require_once 'class.messages.php'; | ||
29 | 32 | ||
30 | $db = new db(DB_PATH); | 33 | Session::init(); |
34 | |||
35 | $store = new $storage_type(); | ||
36 | $msg = new Messages(); | ||
31 | 37 | ||
32 | # initialisation de RainTPL | 38 | # initialisation de RainTPL |
33 | raintpl::$tpl_dir = './tpl/'; | 39 | raintpl::$tpl_dir = './tpl/'; |
@@ -35,4 +41,5 @@ raintpl::$cache_dir = './cache/'; | |||
35 | raintpl::$base_url = get_poche_url(); | 41 | raintpl::$base_url = get_poche_url(); |
36 | raintpl::configure('path_replace', false); | 42 | raintpl::configure('path_replace', false); |
37 | raintpl::configure('debug', false); | 43 | raintpl::configure('debug', false); |
38 | $tpl = new raintpl(); \ No newline at end of file | 44 | $tpl = new raintpl(); |
45 | $tpl->assign('msg', $msg); \ No newline at end of file | ||