]>
git.immae.eu Git - github/wallabag/wallabag.git/blob - inc/config.php
3 * poche, a read it later open source system
6 * @author Nicolas LÅ“uillet <nicolas@loeuillet.org>
8 * @license http://www.wtfpl.net/ see COPYING file
11 define ('POCHE_VERSION', '0.3');
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 define ('LANG', 'fr_FR.UTF8');
25 putenv("LC_ALL=".LANG
);
26 setlocale(LC_ALL
, LANG
);
27 bindtextdomain(LANG
, "./locale");
30 $storage_type = 'sqlite'; # sqlite or file
32 include 'functions.php';
33 require_once 'Readability.php';
34 require_once 'Encoding.php';
35 require_once 'rain.tpl.class.php';
36 require_once 'MyTool.class.php';
37 require_once 'Session.class.php';
38 require_once 'store/store.class.php';
39 require_once 'store/sqlite.class.php';
40 require_once 'store/file.class.php';
41 require_once 'class.messages.php';
45 $store = new $storage_type();
46 # initialisation de RainTPL
47 raintpl
::$tpl_dir = './tpl/';
48 raintpl
::$cache_dir = './cache/';
49 raintpl
::$base_url = get_poche_url();
50 raintpl
::configure('path_replace', false);
51 raintpl
::configure('debug', false);
54 if(!$store->isInstalled())
56 logm('poche still not installed');
57 $tpl->draw('install');
58 if (isset($_GET['install'])) {
59 if (($_POST['password'] == $_POST['password_repeat'])
60 && $_POST['password'] != "" && $_POST['login'] != "") {
61 $store->install($_POST['login'], encode_string($_POST['password'] . $_POST['login']));
69 $_SESSION['login'] = (isset ($_SESSION['login'])) ? $_SESSION['login'] : $store->getLogin();
70 $_SESSION['pass'] = (isset ($_SESSION['pass'])) ? $_SESSION['pass'] : $store->getPassword();
72 $msg = new Messages();
73 $tpl->assign('msg', $msg);