update
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2018 PrestaShop
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/OSL-3.0
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
@@ -16,34 +17,44 @@
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* needs please refer to https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2018 PrestaShop SA
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
/* Debug only */
|
||||
if (!defined('_PS_MODE_DEV_')) {
|
||||
if ( $_SERVER['REMOTE_ADDR'] == '91.189.216.43' )
|
||||
define('_PS_MODE_DEV_', false);
|
||||
else
|
||||
define('_PS_MODE_DEV_', false);
|
||||
define('_PS_MODE_DEV_', false);
|
||||
}
|
||||
/* Compatibility warning */
|
||||
define('_PS_DISPLAY_COMPATIBILITY_WARNING_', false);
|
||||
if (_PS_MODE_DEV_ === true) {
|
||||
$errorReportingLevel = E_ALL | E_STRICT;
|
||||
if (_PS_DISPLAY_COMPATIBILITY_WARNING_ === false) {
|
||||
$errorReportingLevel = $errorReportingLevel & ~E_DEPRECATED & ~E_USER_DEPRECATED;
|
||||
}
|
||||
@ini_set('display_errors', 'on');
|
||||
@error_reporting(E_ALL | E_STRICT);
|
||||
@error_reporting($errorReportingLevel);
|
||||
define('_PS_DEBUG_SQL_', true);
|
||||
} else {
|
||||
@ini_set('display_errors', 'off');
|
||||
define('_PS_DEBUG_SQL_', false);
|
||||
}
|
||||
|
||||
define('_PS_DEBUG_PROFILING_', false);
|
||||
define('_PS_MODE_DEMO_', false);
|
||||
if (!defined('_PS_DEBUG_PROFILING_')) {
|
||||
define('_PS_DEBUG_PROFILING_', false);
|
||||
}
|
||||
if (!defined('_PS_MODE_DEMO_')) {
|
||||
define('_PS_MODE_DEMO_', false);
|
||||
}
|
||||
if (!defined('_PS_SMARTY_CACHING_TYPE_')) {
|
||||
define('_PS_SMARTY_CACHING_TYPE_', 'filesystem');
|
||||
}
|
||||
if (!defined('_PS_ALLOW_MULTI_STATEMENTS_QUERIES_')) {
|
||||
define('_PS_ALLOW_MULTI_STATEMENTS_QUERIES_', false);
|
||||
}
|
||||
|
||||
$currentDir = dirname(__FILE__);
|
||||
|
||||
@@ -69,15 +80,35 @@ define('_PS_ALL_THEMES_DIR_', _PS_ROOT_DIR_.'/themes/');
|
||||
if (defined('_PS_ADMIN_DIR_')) {
|
||||
define('_PS_BO_ALL_THEMES_DIR_', _PS_ADMIN_DIR_.'/themes/');
|
||||
}
|
||||
if (!defined('_PS_CACHE_DIR_')) {
|
||||
$prestashopCacheDir = _PS_ROOT_DIR_.'/var/cache/'.(_PS_MODE_DEV_ ? 'dev': 'prod'). DIRECTORY_SEPARATOR;
|
||||
define('_PS_CACHE_DIR_',$prestashopCacheDir);
|
||||
|
||||
// Find if we are running under a Symfony command
|
||||
$cliEnvValue = null;
|
||||
if (isset($argv) && is_array($argv)) {
|
||||
if (in_array('--env', $argv)) {
|
||||
$cliEnvValue = $argv[array_search('--env', $argv) + 1];
|
||||
} elseif (in_array('-e', $argv)) {
|
||||
$cliEnvValue = $argv[array_search('-e', $argv) + 1];
|
||||
}
|
||||
}
|
||||
|
||||
if ((defined('_PS_IN_TEST_') && _PS_IN_TEST_)
|
||||
|| $cliEnvValue === 'test'
|
||||
) {
|
||||
define('_PS_ENV_', 'test');
|
||||
} else {
|
||||
define('_PS_ENV_', _PS_MODE_DEV_ ? 'dev': 'prod');
|
||||
}
|
||||
|
||||
if (!defined('_PS_CACHE_DIR_')) {
|
||||
define('_PS_CACHE_DIR_', _PS_ROOT_DIR_.'/var/cache/' . _PS_ENV_ . DIRECTORY_SEPARATOR);
|
||||
}
|
||||
|
||||
define('_PS_CONFIG_DIR_', _PS_CORE_DIR_.'/config/');
|
||||
define('_PS_CUSTOM_CONFIG_FILE_', _PS_CONFIG_DIR_.'settings_custom.inc.php');
|
||||
define('_PS_CLASS_DIR_', _PS_CORE_DIR_.'/classes/');
|
||||
if (!defined('_PS_DOWNLOAD_DIR_')) {
|
||||
define('_PS_DOWNLOAD_DIR_', _PS_ROOT_DIR_.'/download/');
|
||||
$dir = (defined('_PS_IN_TEST_') && _PS_IN_TEST_) ? '/tests/Resources/download/' : '/download/';
|
||||
define('_PS_DOWNLOAD_DIR_', _PS_ROOT_DIR_.$dir);
|
||||
}
|
||||
define('_PS_MAIL_DIR_', _PS_CORE_DIR_.'/mails/');
|
||||
if (!defined('_PS_MODULE_DIR_')) {
|
||||
@@ -109,9 +140,12 @@ define('_PS_SWIFT_DIR_', _PS_TOOL_DIR_.'swift/');
|
||||
define('_PS_TAASC_PATH_', _PS_TOOL_DIR_.'taasc/');
|
||||
define('_PS_TCPDF_PATH_', _PS_TOOL_DIR_.'tcpdf/');
|
||||
|
||||
define('_PS_IMG_SOURCE_DIR_', _PS_ROOT_DIR_.'/img/');
|
||||
if (!defined('_PS_IMG_DIR_')) {
|
||||
define('_PS_IMG_DIR_', _PS_ROOT_DIR_.'/img/');
|
||||
$dir = (defined('_PS_IN_TEST_') && _PS_IN_TEST_) ? '/tests/Resources/img/' : '/img/';
|
||||
define('_PS_IMG_DIR_', _PS_ROOT_DIR_.$dir);
|
||||
}
|
||||
|
||||
if (!defined('_PS_HOST_MODE_')) {
|
||||
define('_PS_CORE_IMG_DIR_', _PS_CORE_DIR_.'/img/');
|
||||
} else {
|
||||
@@ -126,6 +160,7 @@ define('_PS_LANG_IMG_DIR_', _PS_IMG_DIR_.'l/');
|
||||
define('_PS_MANU_IMG_DIR_', _PS_IMG_DIR_.'m/');
|
||||
define('_PS_ORDER_STATE_IMG_DIR_', _PS_IMG_DIR_.'os/');
|
||||
define('_PS_PROD_IMG_DIR_', _PS_IMG_DIR_.'p/');
|
||||
define('_PS_PROFILE_IMG_DIR_', _PS_IMG_DIR_.'pr/');
|
||||
define('_PS_SHIP_IMG_DIR_', _PS_IMG_DIR_.'s/');
|
||||
define('_PS_STORE_IMG_DIR_', _PS_IMG_DIR_.'st/');
|
||||
define('_PS_SUPP_IMG_DIR_', _PS_IMG_DIR_.'su/');
|
||||
@@ -197,7 +232,7 @@ define('_PS_SMARTY_CONSOLE_OPEN_BY_URL_', 1);
|
||||
define('_PS_SMARTY_CONSOLE_OPEN_', 2);
|
||||
|
||||
if (!defined('_PS_JQUERY_VERSION_')) {
|
||||
define('_PS_JQUERY_VERSION_', '1.11.0');
|
||||
define('_PS_JQUERY_VERSION_', '1.11.0');
|
||||
}
|
||||
|
||||
define('_PS_CACHE_CA_CERT_FILE_', _PS_CACHE_DIR_.'cacert.pem');
|
||||
|
||||
Reference in New Issue
Block a user