]>
git.immae.eu Git - github/wallabag/wallabag.git/blob - inc/config.php
386fd0360fb941f193b86ef39aef04a9d8e1410e
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
15 define ('DB_PATH', 'sqlite:./db/poche.sqlite');
16 define ('ABS_PATH', 'assets/');
17 define ('CONVERT_LINKS_FOOTNOTES', TRUE);
18 define ('DOWNLOAD_PICTURES', TRUE);
21 include 'functions.php';
22 require_once 'Readability.php';
23 require_once 'Encoding.php';
24 require_once 'rain.tpl.class.php';
26 $db = new db(DB_PATH
);
28 # Initialisation de RainTPL
29 raintpl
::$tpl_dir = './tpl/';
30 raintpl
::$cache_dir = './cache/';
31 raintpl
::$base_url = get_poche_url();
32 raintpl
::configure('path_replace', false);
33 raintpl
::configure('debug', false);
36 # Démarrage session et initialisation du jeton de sécurité
39 if (!isset($_SESSION['token_poche'])) {
40 $token = md5(uniqid(rand(), TRUE));
41 $_SESSION['token_poche'] = $token;
42 $_SESSION['token_time_poche'] = time();
45 # Traitement des paramètres et déclenchement des actions
46 $view = (isset ($_REQUEST['view'])) ? htmlentities($_REQUEST['view']) : 'index';
47 $action = (isset ($_REQUEST['action'])) ? htmlentities($_REQUEST['action']) : '';
48 $_SESSION['sort'] = (isset ($_REQUEST['sort'])) ? htmlentities($_REQUEST['sort']) : 'id';
49 $id = (isset ($_REQUEST['id'])) ? htmlspecialchars($_REQUEST['id']) : '';
50 $url = (isset ($_GET['url'])) ? $_GET['url'] : '';
51 $token = (isset ($_REQUEST['token'])) ? $_REQUEST['token'] : '';
54 action_to_do($action, $url, $token, $id);