diff options
author | Nicolas Lœuillet <nicolas.loeuillet@gmail.com> | 2013-08-08 09:36:10 -0700 |
---|---|---|
committer | Nicolas Lœuillet <nicolas.loeuillet@gmail.com> | 2013-08-08 09:36:10 -0700 |
commit | 9a8b4ff4edf84d7df60de1b6fd1e493b59f88273 (patch) | |
tree | 3c8ab8086fd8a2750270f8aeaee1f1ce016167cb /inc/config.php | |
parent | 85ebc80c7eaf88e4d57a52adb8e4c32d8cc34b64 (diff) | |
parent | 572e758bf2e76308a3fa3eda9a8d9e9be8b53ecc (diff) | |
download | wallabag-9a8b4ff4edf84d7df60de1b6fd1e493b59f88273.tar.gz wallabag-9a8b4ff4edf84d7df60de1b6fd1e493b59f88273.tar.zst wallabag-9a8b4ff4edf84d7df60de1b6fd1e493b59f88273.zip |
Merge pull request #109 from inthepoche/dev
merge dev into master
Diffstat (limited to 'inc/config.php')
-rw-r--r-- | inc/config.php | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/inc/config.php b/inc/config.php deleted file mode 100644 index bd9287fe..00000000 --- a/inc/config.php +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | <?php | ||
2 | /** | ||
3 | * poche, a read it later open source system | ||
4 | * | ||
5 | * @category poche | ||
6 | * @author Nicolas Lœuillet <nicolas@loeuillet.org> | ||
7 | * @copyright 2013 | ||
8 | * @license http://www.wtfpl.net/ see COPYING file | ||
9 | */ | ||
10 | |||
11 | define ('POCHE_VERSION', '0.2.1'); | ||
12 | |||
13 | if (!is_dir('db/')) { | ||
14 | @mkdir('db/',0705); | ||
15 | } | ||
16 | |||
17 | define ('MODE_DEMO', FALSE); | ||
18 | define ('ABS_PATH', 'assets/'); | ||
19 | define ('CONVERT_LINKS_FOOTNOTES', TRUE); | ||
20 | define ('REVERT_FORCED_PARAGRAPH_ELEMENTS',FALSE); | ||
21 | define ('DOWNLOAD_PICTURES', TRUE); | ||
22 | define ('SALT', '464v54gLLw928uz4zUBqkRJeiPY68zCX'); | ||
23 | $storage_type = 'sqlite'; # sqlite or file | ||
24 | |||
25 | include 'functions.php'; | ||
26 | require_once 'Readability.php'; | ||
27 | require_once 'Encoding.php'; | ||
28 | require_once 'rain.tpl.class.php'; | ||
29 | require_once 'MyTool.class.php'; | ||
30 | require_once 'Session.class.php'; | ||
31 | require_once 'store/store.class.php'; | ||
32 | require_once 'store/sqlite.class.php'; | ||
33 | require_once 'store/file.class.php'; | ||
34 | require_once 'class.messages.php'; | ||
35 | |||
36 | Session::init(); | ||
37 | |||
38 | $store = new $storage_type(); | ||
39 | # initialisation de RainTPL | ||
40 | raintpl::$tpl_dir = './tpl/'; | ||
41 | raintpl::$cache_dir = './cache/'; | ||
42 | raintpl::$base_url = get_poche_url(); | ||
43 | raintpl::configure('path_replace', false); | ||
44 | raintpl::configure('debug', false); | ||
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(); | ||
66 | $tpl->assign('msg', $msg); \ No newline at end of file | ||