Merge branch 'ticket-12487-HTTPS' into develop
This commit is contained in:
commit
833315393a
@ -205,7 +205,7 @@ class FrontController extends FrontControllerCore {
|
||||
$smarty->assign('navigationPipe', $navigationPipe);
|
||||
|
||||
//$protocol_link = (Configuration::get('PS_SSL_ENABLED') OR Tools::usingSecureMode()) ? 'https://' : 'http://';
|
||||
$protocol_link = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')?'https://':'http://';
|
||||
$protocol_link = (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PORT'] == '443')?'https://':'http://';
|
||||
|
||||
$useSSL = ((isset($this->ssl) AND $this->ssl AND Configuration::get('PS_SSL_ENABLED')) OR Tools::usingSecureMode()) ? true : false;
|
||||
$protocol_content = ($useSSL) ? 'https://' : 'http://';
|
||||
@ -280,13 +280,15 @@ class FrontController extends FrontControllerCore {
|
||||
'pic_dir' => _THEME_PROD_PIC_DIR_
|
||||
);
|
||||
|
||||
foreach ($assignArray as $assignKey => $assignValue)
|
||||
if (substr($assignValue, 0, 1) == '/' OR $protocol_content == 'https://') {
|
||||
$smarty->assign($assignKey, $protocol_content.Tools::getMediaServer($assignValue).$assignValue);
|
||||
} else if (substr($assignValue, 0, 1) == '/' OR $protocol_link == 'https://') {
|
||||
foreach ($assignArray as $assignKey => $assignValue) {
|
||||
if (substr($assignValue, 0, 1) == '/' && $protocol_link == 'https://') {
|
||||
$smarty->assign($assignKey, $protocol_link.Tools::getMediaServer($assignValue).$assignValue);
|
||||
} else
|
||||
} elseif (substr($assignValue, 0, 1) == '/' OR $protocol_content == 'https://') {
|
||||
$smarty->assign($assignKey, $protocol_content.Tools::getMediaServer($assignValue).$assignValue);
|
||||
} else {
|
||||
$smarty->assign($assignKey, $assignValue);
|
||||
}
|
||||
}
|
||||
|
||||
// setting properties from global var
|
||||
self::$cookie = $cookie;
|
||||
|
@ -64,7 +64,7 @@ class Link extends LinkCore
|
||||
self::$cache['page'][$filename.'_'.$id_lang] = $uri_path;
|
||||
}
|
||||
|
||||
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')?'https://':'http://';
|
||||
$protocol = (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PORT'] == '443')?'https://':'http://';
|
||||
return $protocol.Tools::getShopDomainSsl().__PS_BASE_URI__.ltrim($uri_path, '/');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user