PageRenderTime 2346ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/prestashop/_/config/defines.inc.php

https://gitlab.com/A.Julien/sendstockbymail-module-prestashop
PHP | 218 lines | 141 code | 33 blank | 44 comment | 28 complexity | eee481240e289c2376738f637abb398e MD5 | raw file
  1. <?php
  2. /**
  3. * 2007-2016 PrestaShop
  4. *
  5. * NOTICE OF LICENSE
  6. *
  7. * This source file is subject to the Open Software License (OSL 3.0)
  8. * that is bundled with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://opensource.org/licenses/osl-3.0.php
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@prestashop.com so we can send you a copy immediately.
  14. *
  15. * DISCLAIMER
  16. *
  17. * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
  18. * versions in the future. If you wish to customize PrestaShop for your
  19. * needs please refer to http://www.prestashop.com for more information.
  20. *
  21. * @author PrestaShop SA <contact@prestashop.com>
  22. * @copyright 2007-2016 PrestaShop SA
  23. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  24. * International Registered Trademark & Property of PrestaShop SA
  25. */
  26. /* Debug only */
  27. if (!defined('_PS_MODE_DEV_')) {
  28. define('_PS_MODE_DEV_', false);
  29. }
  30. /* Compatibility warning */
  31. define('_PS_DISPLAY_COMPATIBILITY_WARNING_', false);
  32. if (_PS_MODE_DEV_ === true) {
  33. @ini_set('display_errors', 'on');
  34. @error_reporting(E_ALL | E_STRICT);
  35. define('_PS_DEBUG_SQL_', true);
  36. } else {
  37. @ini_set('display_errors', 'off');
  38. define('_PS_DEBUG_SQL_', false);
  39. }
  40. define('_PS_DEBUG_PROFILING_', false);
  41. define('_PS_MODE_DEMO_', false);
  42. $currentDir = dirname(__FILE__);
  43. if (!defined('PHP_VERSION_ID')) {
  44. $version = explode('.', PHP_VERSION);
  45. define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2]));
  46. }
  47. if (!defined('_PS_VERSION_') && (getenv('_PS_VERSION_') || getenv('REDIRECT__PS_VERSION_'))) {
  48. define('_PS_VERSION_', getenv('_PS_VERSION_') ? getenv('_PS_VERSION_') : getenv('REDIRECT__PS_VERSION_'));
  49. }
  50. if (!defined('_PS_HOST_MODE_') && (getenv('_PS_HOST_MODE_') || getenv('REDIRECT__PS_HOST_MODE_'))) {
  51. define('_PS_HOST_MODE_', getenv('_PS_HOST_MODE_') ? getenv('_PS_HOST_MODE_') : getenv('REDIRECT__PS_HOST_MODE_'));
  52. }
  53. if (!defined('_PS_ROOT_DIR_') && (getenv('_PS_ROOT_DIR_') || getenv('REDIRECT__PS_ROOT_DIR_'))) {
  54. define('_PS_ROOT_DIR_', getenv('_PS_ROOT_DIR_') ? getenv('_PS_ROOT_DIR_') : getenv('REDIRECT__PS_ROOT_DIR_'));
  55. }
  56. /* Directories */
  57. if (!defined('_PS_ROOT_DIR_')) {
  58. define('_PS_ROOT_DIR_', realpath($currentDir.'/..'));
  59. }
  60. if (!defined('_PS_CORE_DIR_')) {
  61. define('_PS_CORE_DIR_', realpath($currentDir.'/..'));
  62. }
  63. define('_PS_ALL_THEMES_DIR_', _PS_ROOT_DIR_.'/themes/');
  64. /* BO THEMES */
  65. if (defined('_PS_ADMIN_DIR_')) {
  66. define('_PS_BO_ALL_THEMES_DIR_', _PS_ADMIN_DIR_.'/themes/');
  67. }
  68. if (!defined('_PS_CACHE_DIR_')) {
  69. define('_PS_CACHE_DIR_', _PS_ROOT_DIR_.'/cache/');
  70. }
  71. define('_PS_CONFIG_DIR_', _PS_CORE_DIR_.'/config/');
  72. define('_PS_CUSTOM_CONFIG_FILE_', _PS_CONFIG_DIR_.'settings_custom.inc.php');
  73. define('_PS_CLASS_DIR_', _PS_CORE_DIR_.'/classes/');
  74. if (!defined('_PS_DOWNLOAD_DIR_')) {
  75. define('_PS_DOWNLOAD_DIR_', _PS_ROOT_DIR_.'/download/');
  76. }
  77. define('_PS_MAIL_DIR_', _PS_CORE_DIR_.'/mails/');
  78. if (!defined('_PS_MODULE_DIR_')) {
  79. define('_PS_MODULE_DIR_', _PS_ROOT_DIR_.'/modules/');
  80. }
  81. if (!defined('_PS_OVERRIDE_DIR_')) {
  82. define('_PS_OVERRIDE_DIR_', _PS_ROOT_DIR_.'/override/');
  83. }
  84. define('_PS_PDF_DIR_', _PS_CORE_DIR_.'/pdf/');
  85. define('_PS_TRANSLATIONS_DIR_', _PS_ROOT_DIR_.'/translations/');
  86. if (!defined('_PS_UPLOAD_DIR_')) {
  87. define('_PS_UPLOAD_DIR_', _PS_ROOT_DIR_.'/upload/');
  88. }
  89. define('_PS_CONTROLLER_DIR_', _PS_CORE_DIR_.'/controllers/');
  90. define('_PS_ADMIN_CONTROLLER_DIR_', _PS_CORE_DIR_.'/controllers/admin/');
  91. define('_PS_FRONT_CONTROLLER_DIR_', _PS_CORE_DIR_.'/controllers/front/');
  92. define('_PS_TOOL_DIR_', _PS_CORE_DIR_.'/tools/');
  93. if (!defined('_PS_GEOIP_DIR_')) {
  94. define('_PS_GEOIP_DIR_', _PS_TOOL_DIR_.'geoip/');
  95. }
  96. if (!defined('_PS_GEOIP_CITY_FILE_')) {
  97. define('_PS_GEOIP_CITY_FILE_', 'GeoLiteCity.dat');
  98. }
  99. define('_PS_PEAR_XML_PARSER_PATH_', _PS_TOOL_DIR_.'pear_xml_parser/');
  100. define('_PS_SWIFT_DIR_', _PS_TOOL_DIR_.'swift/');
  101. define('_PS_TAASC_PATH_', _PS_TOOL_DIR_.'taasc/');
  102. define('_PS_TCPDF_PATH_', _PS_TOOL_DIR_.'tcpdf/');
  103. if (!defined('_PS_IMG_DIR_')) {
  104. define('_PS_IMG_DIR_', _PS_ROOT_DIR_.'/img/');
  105. }
  106. if (!defined('_PS_HOST_MODE_')) {
  107. define('_PS_CORE_IMG_DIR_', _PS_CORE_DIR_.'/img/');
  108. } else {
  109. define('_PS_CORE_IMG_DIR_', _PS_ROOT_DIR_.'/img/');
  110. }
  111. define('_PS_CAT_IMG_DIR_', _PS_IMG_DIR_.'c/');
  112. define('_PS_COL_IMG_DIR_', _PS_IMG_DIR_.'co/');
  113. define('_PS_EMPLOYEE_IMG_DIR_', _PS_IMG_DIR_.'e/');
  114. define('_PS_GENDERS_DIR_', _PS_IMG_DIR_.'genders/');
  115. define('_PS_LANG_IMG_DIR_', _PS_IMG_DIR_.'l/');
  116. define('_PS_MANU_IMG_DIR_', _PS_IMG_DIR_.'m/');
  117. define('_PS_ORDER_STATE_IMG_DIR_', _PS_IMG_DIR_.'os/');
  118. define('_PS_PROD_IMG_DIR_', _PS_IMG_DIR_.'p/');
  119. define('_PS_SCENE_IMG_DIR_', _PS_IMG_DIR_.'scenes/');
  120. define('_PS_SCENE_THUMB_IMG_DIR_', _PS_IMG_DIR_.'scenes/thumbs/');
  121. define('_PS_SHIP_IMG_DIR_', _PS_IMG_DIR_.'s/');
  122. define('_PS_STORE_IMG_DIR_', _PS_IMG_DIR_.'st/');
  123. define('_PS_SUPP_IMG_DIR_', _PS_IMG_DIR_.'su/');
  124. define('_PS_TMP_IMG_DIR_', _PS_IMG_DIR_.'tmp/');
  125. /* settings php */
  126. define('_PS_TRANS_PATTERN_', '(.*[^\\\\])');
  127. define('_PS_MIN_TIME_GENERATE_PASSWD_', '360');
  128. if (!defined('_PS_MAGIC_QUOTES_GPC_')) {
  129. define('_PS_MAGIC_QUOTES_GPC_', get_magic_quotes_gpc());
  130. }
  131. define('_CAN_LOAD_FILES_', 1);
  132. /* Order statuses
  133. Order statuses have been moved into config.inc.php file for backward compatibility reasons */
  134. /* Tax behavior */
  135. define('PS_PRODUCT_TAX', 0);
  136. define('PS_STATE_TAX', 1);
  137. define('PS_BOTH_TAX', 2);
  138. define('PS_TAX_EXC', 1);
  139. define('PS_TAX_INC', 0);
  140. define('PS_ORDER_PROCESS_STANDARD', 0);
  141. define('PS_ORDER_PROCESS_OPC', 1);
  142. define('PS_ROUND_UP', 0);
  143. define('PS_ROUND_DOWN', 1);
  144. define('PS_ROUND_HALF_UP', 2);
  145. define('PS_ROUND_HALF_DOWN', 3);
  146. define('PS_ROUND_HALF_EVEN', 4);
  147. define('PS_ROUND_HALF_ODD', 5);
  148. /* Backward compatibility */
  149. define('PS_ROUND_HALF', PS_ROUND_HALF_UP);
  150. /* Registration behavior */
  151. define('PS_REGISTRATION_PROCESS_STANDARD', 0);
  152. define('PS_REGISTRATION_PROCESS_AIO', 1);
  153. /* Carrier::getCarriers() filter */
  154. // these defines are DEPRECATED since 1.4.5 version
  155. define('PS_CARRIERS_ONLY', 1);
  156. define('CARRIERS_MODULE', 2);
  157. define('CARRIERS_MODULE_NEED_RANGE', 3);
  158. define('PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE', 4);
  159. define('ALL_CARRIERS', 5);
  160. /* SQL Replication management */
  161. define('_PS_USE_SQL_SLAVE_', 0);
  162. /* PS Technical configuration */
  163. define('_PS_ADMIN_PROFILE_', 1);
  164. /* Stock Movement */
  165. define('_STOCK_MOVEMENT_ORDER_REASON_', 3);
  166. define('_STOCK_MOVEMENT_MISSING_REASON_', 4);
  167. /**
  168. * @deprecated 1.5.0.1
  169. * @see Configuration::get('PS_CUSTOMER_GROUP')
  170. */
  171. define('_PS_DEFAULT_CUSTOMER_GROUP_', 3);
  172. define('_PS_CACHEFS_DIRECTORY_', _PS_ROOT_DIR_.'/cache/cachefs/');
  173. /* Geolocation */
  174. define('_PS_GEOLOCATION_NO_CATALOG_', 0);
  175. define('_PS_GEOLOCATION_NO_ORDER_', 1);
  176. define('MIN_PASSWD_LENGTH', 8);
  177. define('_PS_SMARTY_NO_COMPILE_', 0);
  178. define('_PS_SMARTY_CHECK_COMPILE_', 1);
  179. define('_PS_SMARTY_FORCE_COMPILE_', 2);
  180. define('_PS_SMARTY_CONSOLE_CLOSE_', 0);
  181. define('_PS_SMARTY_CONSOLE_OPEN_BY_URL_', 1);
  182. define('_PS_SMARTY_CONSOLE_OPEN_', 2);
  183. if (!defined('_PS_JQUERY_VERSION_')) {
  184. define('_PS_JQUERY_VERSION_', '1.11.0');
  185. }