// Add exceptions in db classes + normalize some files + split defines.inc file

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9216 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-10-11 10:04:23 +00:00
parent 4d93b9a5fe
commit 4d91a31031
10 changed files with 86 additions and 57 deletions
+3 -2
View File
@@ -56,6 +56,7 @@ if (!file_exists(dirname(__FILE__).'/settings.inc.php'))
exit;
}
require_once(dirname(__FILE__).'/settings.inc.php');
require_once(dirname(__FILE__).'/defines.inc.php');
require_once(dirname(__FILE__).'/autoload.php');
/* Redefine REQUEST_URI if empty (on some webservers...) */
@@ -84,8 +85,8 @@ Context::getContext()->shop = Shop::initialize();
define('_THEME_NAME_', Context::getContext()->shop->getTheme());
define('__PS_BASE_URI__', Context::getContext()->shop->getBaseURI());
/* Include all defines */
require_once(dirname(__FILE__).'/defines.inc.php');
/* Include all defines related to base uri and theme name */
require_once(dirname(__FILE__).'/defines_uri.inc.php');
if (!defined('_PS_MODULE_DIR_'))
define('_PS_MODULE_DIR_', _PS_ROOT_DIR_.'/modules/');
+2 -33
View File
@@ -35,38 +35,6 @@ if (!defined('PHP_VERSION_ID'))
define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2]));
}
/* Theme URLs */
define('_THEMES_DIR_', __PS_BASE_URI__.'themes/');
define('_THEME_DIR_', _THEMES_DIR_._THEME_NAME_.'/');
define('_THEME_IMG_DIR_', _THEME_DIR_.'img/');
define('_THEME_CSS_DIR_', _THEME_DIR_.'css/');
define('_THEME_JS_DIR_', _THEME_DIR_.'js/');
/* Image URLs */
define('_PS_IMG_', __PS_BASE_URI__.'img/');
define('_PS_ADMIN_IMG_', _PS_IMG_.'admin/');
define('_PS_TMP_IMG_', _PS_IMG_.'tmp/');
define('_THEME_CAT_DIR_', _PS_IMG_.'c/');
define('_THEME_PROD_DIR_', _PS_IMG_.'p/');
define('_THEME_MANU_DIR_', _PS_IMG_.'m/');
define('_THEME_SCENE_DIR_', _PS_IMG_.'scenes/');
define('_THEME_SCENE_THUMB_DIR_', _PS_IMG_.'scenes/thumbs');
define('_THEME_SUP_DIR_', _PS_IMG_.'su/');
define('_THEME_SHIP_DIR_', _PS_IMG_.'s/');
define('_THEME_STORE_DIR_', _PS_IMG_.'st/');
define('_THEME_LANG_DIR_', _PS_IMG_.'l/');
define('_THEME_COL_DIR_', _PS_IMG_.'co/');
define('_THEME_GENDERS_DIR_', _PS_IMG_.'genders/');
define('_SUPP_DIR_', _PS_IMG_.'su/');
define('_PS_PROD_IMG_', 'img/p/');
/* Other URLs */
define('_PS_JS_DIR_', __PS_BASE_URI__.'js/');
define('_PS_CSS_DIR_', __PS_BASE_URI__.'css/');
define('_THEME_PROD_PIC_DIR_', __PS_BASE_URI__.'upload/');
define('_MAIL_DIR_', __PS_BASE_URI__.'mails/');
define('_MODULE_DIR_', __PS_BASE_URI__.'modules/');
/* Directories */
define('_PS_ROOT_DIR_', realpath($currentDir.'/..'));
define('_PS_CLASS_DIR_', _PS_ROOT_DIR_.'/classes/');
@@ -77,7 +45,6 @@ define('_PS_TRANSLATIONS_DIR_', _PS_ROOT_DIR_.'/translations/');
define('_PS_DOWNLOAD_DIR_', _PS_ROOT_DIR_.'/download/');
define('_PS_MAIL_DIR_', _PS_ROOT_DIR_.'/mails/');
define('_PS_ALL_THEMES_DIR_', _PS_ROOT_DIR_.'/themes/');
define('_PS_THEME_DIR_', _PS_ROOT_DIR_.'/themes/'._THEME_NAME_.'/');
define('_PS_IMG_DIR_', _PS_ROOT_DIR_.'/img/');
if (!defined('_PS_MODULE_DIR_'))
define('_PS_MODULE_DIR_', _PS_ROOT_DIR_.'/modules/');
@@ -151,6 +118,8 @@ define('_STOCK_MOVEMENT_MISSING_REASON_', 4);
define('_PS_DEFAULT_CUSTOMER_GROUP_', 1);
define('_PS_CACHEFS_DIRECTORY_', _PS_ROOT_DIR_.'/cache/cachefs/');
/* Geolocation */
define('_PS_GEOLOCATION_NO_CATALOG_', 0);
define('_PS_GEOLOCATION_NO_ORDER_', 1);
+59
View File
@@ -0,0 +1,59 @@
<?php
/*
* 2007-2011 PrestaShop
*
* 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.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* 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.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision$
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
/* Theme URLs */
define('_PS_THEME_DIR_', _PS_ROOT_DIR_.'/themes/'._THEME_NAME_.'/');
define('_THEMES_DIR_', __PS_BASE_URI__.'themes/');
define('_THEME_DIR_', _THEMES_DIR_._THEME_NAME_.'/');
define('_THEME_IMG_DIR_', _THEME_DIR_.'img/');
define('_THEME_CSS_DIR_', _THEME_DIR_.'css/');
define('_THEME_JS_DIR_', _THEME_DIR_.'js/');
/* Image URLs */
define('_PS_IMG_', __PS_BASE_URI__.'img/');
define('_PS_ADMIN_IMG_', _PS_IMG_.'admin/');
define('_PS_TMP_IMG_', _PS_IMG_.'tmp/');
define('_THEME_CAT_DIR_', _PS_IMG_.'c/');
define('_THEME_PROD_DIR_', _PS_IMG_.'p/');
define('_THEME_MANU_DIR_', _PS_IMG_.'m/');
define('_THEME_SCENE_DIR_', _PS_IMG_.'scenes/');
define('_THEME_SCENE_THUMB_DIR_', _PS_IMG_.'scenes/thumbs');
define('_THEME_SUP_DIR_', _PS_IMG_.'su/');
define('_THEME_SHIP_DIR_', _PS_IMG_.'s/');
define('_THEME_STORE_DIR_', _PS_IMG_.'st/');
define('_THEME_LANG_DIR_', _PS_IMG_.'l/');
define('_THEME_COL_DIR_', _PS_IMG_.'co/');
define('_THEME_GENDERS_DIR_', _PS_IMG_.'genders/');
define('_SUPP_DIR_', _PS_IMG_.'su/');
define('_PS_PROD_IMG_', 'img/p/');
/* Other URLs */
define('_PS_JS_DIR_', __PS_BASE_URI__.'js/');
define('_PS_CSS_DIR_', __PS_BASE_URI__.'css/');
define('_THEME_PROD_PIC_DIR_', __PS_BASE_URI__.'upload/');
define('_MAIL_DIR_', __PS_BASE_URI__.'mails/');
define('_MODULE_DIR_', __PS_BASE_URI__.'modules/');