[-] FO : #PSCFV-2211 : Make sure _PS_BASE_URL_ is defined

This commit is contained in:
gCharmes
2012-05-10 16:59:05 +00:00
parent 3a31fc80ad
commit 94723fce40
2 changed files with 16 additions and 16 deletions
+6 -1
View File
@@ -44,6 +44,11 @@ class LinkCore
$this->url = $_SERVER['SCRIPT_NAME'];
$this->protocol_link = $protocol_link;
$this->protocol_content = $protocol_content;
if (!defined('_PS_BASE_URL_'))
define('_PS_BASE_URL_', Tools::getShopDomain(true));
if (!defined('_PS_BASE_URL_SSL_'))
define('_PS_BASE_URL_SSL_', Tools::getShopDomainSsl(true));
}
/**
@@ -204,7 +209,7 @@ class LinkCore
*/
public function getCMSLink($cms, $alias = null, $ssl = false, $id_lang = null)
{
$base = (($ssl && Configuration::get('PS_SSL_ENABLED')) ? Tools::getShopDomainSsl(true) : Tools::getShopDomain(true));
$base = (($ssl && Configuration::get('PS_SSL_ENABLED')) ? _PS_BASE_URL_SSL_ : _PS_BASE_URL_);
if (!$id_lang)
$id_lang = Context::getContext()->language->id;