2013-08-04 18:58:31 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* poche, a read it later open source system
|
|
|
|
*
|
|
|
|
* @category poche
|
|
|
|
* @author Nicolas Lœuillet <nicolas@loeuillet.org>
|
|
|
|
* @copyright 2013
|
|
|
|
* @license http://www.wtfpl.net/ see COPYING file
|
|
|
|
*/
|
|
|
|
|
2013-08-07 12:38:58 +00:00
|
|
|
# storage
|
2013-08-07 17:14:28 +00:00
|
|
|
define ('STORAGE','sqlite'); # postgres, mysql, sqlite
|
2013-08-07 12:38:58 +00:00
|
|
|
define ('STORAGE_SERVER', 'localhost'); # leave blank for sqlite
|
|
|
|
define ('STORAGE_DB', 'poche'); # only for postgres & mysql
|
|
|
|
define ('STORAGE_SQLITE', './db/poche.sqlite');
|
|
|
|
define ('STORAGE_USER', 'postgres'); # leave blank for sqlite
|
|
|
|
define ('STORAGE_PASSWORD', 'postgres'); # leave blank for sqlite
|
|
|
|
|
2013-08-11 19:04:04 +00:00
|
|
|
define ('POCHE_VERSION', '1.0-beta2');
|
2013-08-05 08:03:59 +00:00
|
|
|
define ('MODE_DEMO', FALSE);
|
2013-08-08 19:28:37 +00:00
|
|
|
define ('DEBUG_POCHE', FALSE);
|
2013-08-04 18:58:31 +00:00
|
|
|
define ('CONVERT_LINKS_FOOTNOTES', FALSE);
|
|
|
|
define ('REVERT_FORCED_PARAGRAPH_ELEMENTS', FALSE);
|
|
|
|
define ('DOWNLOAD_PICTURES', FALSE);
|
2013-08-05 07:43:33 +00:00
|
|
|
define ('SHARE_TWITTER', TRUE);
|
2013-08-05 13:54:37 +00:00
|
|
|
define ('SHARE_MAIL', TRUE);
|
2013-08-04 18:58:31 +00:00
|
|
|
define ('SALT', '464v54gLLw928uz4zUBqkRJeiPY68zCX');
|
|
|
|
define ('ABS_PATH', 'assets/');
|
|
|
|
define ('TPL', './tpl');
|
|
|
|
define ('LOCALE', './locale');
|
|
|
|
define ('CACHE', './cache');
|
2013-08-06 12:18:03 +00:00
|
|
|
define ('LANG', 'en_EN.UTF8');
|
2013-08-05 19:56:32 +00:00
|
|
|
define ('PAGINATION', '10');
|
|
|
|
define ('THEME', 'light');
|
2013-08-04 18:58:31 +00:00
|
|
|
|
|
|
|
# /!\ Be careful if you change the lines below /!\
|
2013-08-15 08:54:14 +00:00
|
|
|
if (!file_exists('./vendor/autoload.php')) {
|
|
|
|
die('Twig does not seem installed. Have a look at <a href="http://inthepoche.com/?pages/Documentation">the documentation.</a>');
|
|
|
|
}
|
|
|
|
|
2013-08-06 12:18:03 +00:00
|
|
|
require_once './inc/poche/User.class.php';
|
2013-08-04 18:58:31 +00:00
|
|
|
require_once './inc/poche/Tools.class.php';
|
|
|
|
require_once './inc/poche/Url.class.php';
|
2013-08-05 19:56:32 +00:00
|
|
|
require_once './inc/3rdparty/class.messages.php';
|
2013-08-04 18:58:31 +00:00
|
|
|
require_once './inc/poche/Poche.class.php';
|
|
|
|
require_once './inc/3rdparty/Readability.php';
|
|
|
|
require_once './inc/3rdparty/Encoding.php';
|
2013-08-07 12:24:07 +00:00
|
|
|
require_once './inc/poche/Database.class.php';
|
2013-08-04 18:58:31 +00:00
|
|
|
require_once './vendor/autoload.php';
|
2013-08-04 19:42:46 +00:00
|
|
|
require_once './inc/3rdparty/simple_html_dom.php';
|
2013-08-05 19:56:32 +00:00
|
|
|
require_once './inc/3rdparty/paginator.php';
|
2013-08-05 20:50:00 +00:00
|
|
|
require_once './inc/3rdparty/Session.class.php';
|
2013-08-04 18:58:31 +00:00
|
|
|
|
|
|
|
if (DOWNLOAD_PICTURES) {
|
2013-08-05 10:34:16 +00:00
|
|
|
require_once './inc/poche/pochePictures.php';
|
2013-08-04 18:58:31 +00:00
|
|
|
}
|
|
|
|
|
2013-08-07 12:24:07 +00:00
|
|
|
$poche = new Poche();
|
2013-08-05 20:50:00 +00:00
|
|
|
#XSRF protection with token
|
|
|
|
// if (!empty($_POST)) {
|
|
|
|
// if (!Session::isToken($_POST['token'])) {
|
|
|
|
// die(_('Wrong token'));
|
|
|
|
// }
|
|
|
|
// unset($_SESSION['tokens']);
|
|
|
|
// }
|