]>
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');
12 define ('MODE_DEMO', FALSE);
13 define ('DEBUG_POCHE', TRUE);
14 define ('CONVERT_LINKS_FOOTNOTES', FALSE);
15 define ('REVERT_FORCED_PARAGRAPH_ELEMENTS', FALSE);
16 define ('DOWNLOAD_PICTURES', FALSE);
17 define ('SALT', '464v54gLLw928uz4zUBqkRJeiPY68zCX');
18 define ('ABS_PATH', 'assets/');
19 define ('TPL', './tpl');
20 define ('LOCALE', './locale');
21 define ('CACHE', './cache');
22 define ('LANG', 'fr_FR.UTF8');
24 $storage_type = 'sqlite'; # sqlite or file
26 # /!\ Be careful if you change the lines below /!\
28 require_once 'poche/pocheTools.class.php';
29 require_once 'poche/pocheCore.php';
30 require_once '3rdparty/Readability.php';
31 require_once '3rdparty/Encoding.php';
32 require_once '3rdparty/Session.class.php';
33 require_once '3rdparty/Twig/Autoloader.php';
34 require_once 'store/store.class.php';
35 require_once 'store/' . $storage_type . '.class.php';
37 if (DOWNLOAD_PICTURES
) {
38 require_once 'poche/pochePicture.php';
42 putenv('LC_ALL=' . LANG
);
43 setlocale(LC_ALL
, LANG
);
44 bindtextdomain(LANG
, LOCALE
);
48 Twig_Autoloader
::register();
49 $loader = new Twig_Loader_Filesystem(TPL
);
50 $twig = new Twig_Environment($loader, array(
53 $twig->addExtension(new Twig_Extensions_Extension_I18n());
56 $store = new $storage_type();
59 if(!$store->isInstalled())
61 pocheTools
::logm('poche still not installed');
62 echo $twig->render('install.twig', array(
63 'token' => Session
::getToken(),
65 if (isset($_GET['install'])) {
66 if (($_POST['password'] == $_POST['password_repeat'])
67 && $_POST['password'] != "" && $_POST['login'] != "") {
68 # let's rock, install poche baby !
69 $store->install($_POST['login'], encode_string($_POST['password'] . $_POST['login']));
71 pocheTools
::redirect();
77 $_SESSION['login'] = (isset ($_SESSION['login'])) ? $_SESSION['login'] : $store->getLogin();
78 $_SESSION['pass'] = (isset ($_SESSION['pass'])) ? $_SESSION['pass'] : $store->getPassword();