diff options
Diffstat (limited to 'inc/poche/global.inc.php')
-rwxr-xr-x | inc/poche/global.inc.php | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/inc/poche/global.inc.php b/inc/poche/global.inc.php index 8cf86d03..b8c487e3 100755 --- a/inc/poche/global.inc.php +++ b/inc/poche/global.inc.php | |||
@@ -5,7 +5,7 @@ | |||
5 | * @category wallabag | 5 | * @category wallabag |
6 | * @author Nicolas LÅ“uillet <nicolas@loeuillet.org> | 6 | * @author Nicolas LÅ“uillet <nicolas@loeuillet.org> |
7 | * @copyright 2013 | 7 | * @copyright 2013 |
8 | * @license http://www.wtfpl.net/ see COPYING file | 8 | * @license http://opensource.org/licenses/MIT see COPYING file |
9 | */ | 9 | */ |
10 | 10 | ||
11 | # the poche system root directory (/inc) | 11 | # the poche system root directory (/inc) |
@@ -18,6 +18,11 @@ require_once INCLUDES . '/poche/Tools.class.php'; | |||
18 | require_once INCLUDES . '/poche/User.class.php'; | 18 | require_once INCLUDES . '/poche/User.class.php'; |
19 | require_once INCLUDES . '/poche/Url.class.php'; | 19 | require_once INCLUDES . '/poche/Url.class.php'; |
20 | require_once INCLUDES . '/3rdparty/class.messages.php'; | 20 | require_once INCLUDES . '/3rdparty/class.messages.php'; |
21 | require_once ROOT . '/vendor/autoload.php'; | ||
22 | require_once INCLUDES . '/poche/Template.class.php'; | ||
23 | require_once INCLUDES . '/poche/Language.class.php'; | ||
24 | require_once INCLUDES . '/poche/Routing.class.php'; | ||
25 | require_once INCLUDES . '/poche/WallabagEpub.class.php'; | ||
21 | require_once INCLUDES . '/poche/Poche.class.php'; | 26 | require_once INCLUDES . '/poche/Poche.class.php'; |
22 | 27 | ||
23 | require_once INCLUDES . '/poche/Database.class.php'; | 28 | require_once INCLUDES . '/poche/Database.class.php'; |
@@ -36,25 +41,18 @@ require_once INCLUDES . '/3rdparty/libraries/PHPePub/Logger.php'; | |||
36 | require_once INCLUDES . '/3rdparty/libraries/PHPePub/EPub.php'; | 41 | require_once INCLUDES . '/3rdparty/libraries/PHPePub/EPub.php'; |
37 | require_once INCLUDES . '/3rdparty/libraries/PHPePub/EPubChapterSplitter.php'; | 42 | require_once INCLUDES . '/3rdparty/libraries/PHPePub/EPubChapterSplitter.php'; |
38 | 43 | ||
39 | # Composer its autoloader for automatically loading Twig | ||
40 | if (! file_exists(ROOT . '/vendor/autoload.php')) { | ||
41 | Poche::$canRenderTemplates = false; | ||
42 | } else { | ||
43 | require_once ROOT . '/vendor/autoload.php'; | ||
44 | } | ||
45 | |||
46 | # system configuration; database credentials et caetera | 44 | # system configuration; database credentials et caetera |
47 | if (! file_exists(INCLUDES . '/poche/config.inc.php')) { | 45 | require_once INCLUDES . '/poche/config.inc.php'; |
48 | Poche::$configFileAvailable = false; | 46 | require_once INCLUDES . '/poche/config.inc.default.php'; |
49 | } else { | ||
50 | require_once INCLUDES . '/poche/config.inc.php'; | ||
51 | require_once INCLUDES . '/poche/config.inc.default.php'; | ||
52 | } | ||
53 | 47 | ||
54 | if (Poche::$configFileAvailable && DOWNLOAD_PICTURES) { | 48 | if (DOWNLOAD_PICTURES) { |
55 | require_once INCLUDES . '/poche/pochePictures.php'; | 49 | require_once INCLUDES . '/poche/pochePictures.php'; |
56 | } | 50 | } |
57 | 51 | ||
58 | if (!ini_get('date.timezone') || !@date_default_timezone_set(ini_get('date.timezone'))) { | 52 | if (!ini_get('date.timezone') || !@date_default_timezone_set(ini_get('date.timezone'))) { |
59 | date_default_timezone_set('UTC'); | 53 | date_default_timezone_set('UTC'); |
60 | } \ No newline at end of file | 54 | } |
55 | |||
56 | if (defined('ERROR_REPORTING')) { | ||
57 | error_reporting(ERROR_REPORTING); | ||
58 | } | ||