aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/config.php
diff options
context:
space:
mode:
authornicosomb <nicolas@loeuillet.org>2013-04-19 15:46:04 +0200
committernicosomb <nicolas@loeuillet.org>2013-04-19 15:46:04 +0200
commit14890de35a19b44df6537e601240fe38ff6a9ed9 (patch)
tree7802fdcce30bab91c7f97f73fd0456cc0c5d8bd3 /inc/config.php
parentff4d8c8c1efca0759330906419cb5f36de86d156 (diff)
downloadwallabag-14890de35a19b44df6537e601240fe38ff6a9ed9.tar.gz
wallabag-14890de35a19b44df6537e601240fe38ff6a9ed9.tar.zst
wallabag-14890de35a19b44df6537e601240fe38ff6a9ed9.zip
création d'une classe store() pour gérer tout type de stockage : sqlite, file, mysql, etc.
Diffstat (limited to 'inc/config.php')
-rw-r--r--inc/config.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/inc/config.php b/inc/config.php
index c63b07b9..cf3529cb 100644
--- a/inc/config.php
+++ b/inc/config.php
@@ -8,26 +8,28 @@
8 * @license http://www.wtfpl.net/ see COPYING file 8 * @license http://www.wtfpl.net/ see COPYING file
9 */ 9 */
10 10
11define ('POCHE_VERSION', '0.11'); 11define ('POCHE_VERSION', '0.2');
12 12
13if (!is_dir('db/')) { 13if (!is_dir('db/')) {
14 @mkdir('db/',0705); 14 @mkdir('db/',0705);
15} 15}
16 16
17define ('DB_PATH', 'sqlite:./db/poche.sqlite');
18define ('ABS_PATH', 'assets/'); 17define ('ABS_PATH', 'assets/');
19define ('CONVERT_LINKS_FOOTNOTES', TRUE); 18define ('CONVERT_LINKS_FOOTNOTES', TRUE);
20define ('DOWNLOAD_PICTURES', TRUE); 19define ('DOWNLOAD_PICTURES', TRUE);
20$storage_type = 'sqlite'; # sqlite or file
21 21
22include 'db.php';
23include 'functions.php'; 22include 'functions.php';
24require_once 'Readability.php'; 23require_once 'Readability.php';
25require_once 'Encoding.php'; 24require_once 'Encoding.php';
26require_once 'rain.tpl.class.php'; 25require_once 'rain.tpl.class.php';
27require_once 'MyTool.class.php'; 26require_once 'MyTool.class.php';
28require_once 'Session.class.php'; 27require_once 'Session.class.php';
28require_once 'store/store.class.php';
29require_once 'store/sqlite.class.php';
30require_once 'store/file.class.php';
29 31
30$db = new db(DB_PATH); 32$store = new $storage_type();
31 33
32# initialisation de RainTPL 34# initialisation de RainTPL
33raintpl::$tpl_dir = './tpl/'; 35raintpl::$tpl_dir = './tpl/';