]>
Commit | Line | Data |
---|---|---|
00dbaf90 NL |
1 | <?php |
2 | /** | |
3 | * poche, a read it later open source system | |
4 | * | |
5 | * @category poche | |
5801355c | 6 | * @author Nicolas Lœuillet <support@inthepoche.com> |
00dbaf90 NL |
7 | * @copyright 2013 |
8 | * @license http://www.wtfpl.net/ see COPYING file | |
9 | */ | |
10 | ||
11 | # the poche system root directory (/inc) | |
12 | define('INCLUDES', dirname(__FILE__) . '/..'); | |
13 | ||
14 | # the poche root directory | |
15 | define('ROOT', INCLUDES . '/..'); | |
16 | ||
17 | require_once INCLUDES . '/poche/Tools.class.php'; | |
18 | require_once INCLUDES . '/poche/User.class.php'; | |
19 | require_once INCLUDES . '/poche/Url.class.php'; | |
20 | require_once INCLUDES . '/3rdparty/class.messages.php'; | |
21 | require_once INCLUDES . '/poche/Poche.class.php'; | |
22 | ||
00dbaf90 NL |
23 | require_once INCLUDES . '/poche/Database.class.php'; |
24 | require_once INCLUDES . '/3rdparty/simple_html_dom.php'; | |
25 | require_once INCLUDES . '/3rdparty/paginator.php'; | |
26 | require_once INCLUDES . '/3rdparty/Session.class.php'; | |
27 | ||
42c80841 NL |
28 | require_once INCLUDES . '/3rdparty/libraries/feedwriter/FeedItem.php'; |
29 | require_once INCLUDES . '/3rdparty/libraries/feedwriter/FeedWriter.php'; | |
00dbaf90 NL |
30 | require_once INCLUDES . '/3rdparty/FlattrItem.class.php'; |
31 | ||
32 | # Composer its autoloader for automatically loading Twig | |
33 | if (! file_exists(ROOT . '/vendor/autoload.php')) { | |
34 | Poche::$canRenderTemplates = false; | |
35 | } else { | |
36 | require_once ROOT . '/vendor/autoload.php'; | |
37 | } | |
38 | ||
39 | # system configuration; database credentials et cetera | |
40 | if (! file_exists(INCLUDES . '/poche/config.inc.php')) { | |
41 | Poche::$configFileAvailable = false; | |
42 | } else { | |
43 | require_once INCLUDES . '/poche/config.inc.php'; | |
44 | } | |
45 | ||
46 | if (Poche::$configFileAvailable && DOWNLOAD_PICTURES) { | |
47 | require_once INCLUDES . '/poche/pochePictures.php'; | |
48 | } | |
49 | ||
50 | if (!ini_get('date.timezone') || !@date_default_timezone_set(ini_get('date.timezone'))) { | |
51 | date_default_timezone_set('UTC'); | |
00dbaf90 | 52 | } |