-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtop.inc.php
45 lines (35 loc) · 1.46 KB
/
top.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
// vim: set ts=4 sw=4 sts=4 et:
/**
* Copyright (c) 2011-present Qualiteam software Ltd. All rights reserved.
* See https://www.x-cart.com/license-agreement.html for license details.
*/
// No PHP warnings are allowed in LC
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', true);
ini_set('arg_separator.output', '&');
// Short name
define('LC_DS', DIRECTORY_SEPARATOR);
// Modes
define('LC_IS_CLI_MODE', 'cli' === PHP_SAPI);
// Common end-of-line
define('LC_EOL', LC_IS_CLI_MODE ? "\n" : '<br />');
require_once __DIR__ . LC_DS . 'service' . LC_DS . 'vendor' . LC_DS . 'autoload.php';
require_once __DIR__ . LC_DS . 'vendor' . LC_DS . 'autoload.php';
require_once __DIR__ . LC_DS . 'modules_manager' . LC_DS . 'autoload.php';
// Define error handling functions and check PHP version (if needed)
require_once __DIR__ . LC_DS . 'error_handler.php';
require_once __DIR__ . LC_DS . 'top.inc.PHP53.php';
if (defined('LC_INCLUDE_ADDITIONAL')) {
// Clean URLs support
$level = ob_get_level();
try {
define('LC_USE_CLEAN_URLS', \XLite\Core\Config::getInstance()->CleanURL->clean_url_flag);
} catch (XLite\Core\Database\Migration\UnsupportedDatabaseOperationDuringMaintenanceException $e) {
// Get back to original output buffering level to discard all buffered content
while (ob_get_level() > $level) {
ob_end_clean();
}
\Includes\Decorator\Utils\CacheManager::triggerMaintenanceModeError();
}
}