start of changement to full https
This commit is contained in:
parent
8fabe0bfa7
commit
2e6e1d23ec
@ -1,5 +1,5 @@
|
||||
<!-- MODULE Gift Voucher -->
|
||||
<link href="{$content_dir}modules/giftvoucher/giftvoucher.css" rel="stylesheet" type="text/css" />
|
||||
<link href="{$base_dir_ssl}modules/giftvoucher/giftvoucher.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var giftvoucher_products = "{$GIFT_VOUCHER_PRODUCTS}";
|
||||
@ -23,5 +23,5 @@
|
||||
{/literal}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="{$content_dir}modules/giftvoucher/giftvoucher.js?v=3"></script>
|
||||
<script type="text/javascript" src="{$base_dir_ssl}modules/giftvoucher/giftvoucher.js?v=3"></script>
|
||||
<!-- /MODULE Gift Voucher -->
|
||||
|
@ -23,7 +23,7 @@ if(($sponsor = Tools::getValue('sponsor')) && strlen($sponsor) > 12) {
|
||||
if(Tools::getIsset('lp')) {
|
||||
$lp = Tools::getValue('lp');
|
||||
}
|
||||
Tools::redirectLink($link->getPageLink('authentication.php').'?create_account=1&sponsor='.rawurlencode($cipherTool->encrypt('1|'.$email.'|')).(isset($url['query'])? '&'.$url['query']: '').(isset($lp)? '&lp='.$lp: ''));
|
||||
Tools::redirectLink($link->getPageLinkSsl('authentication.php').'?create_account=1&sponsor='.rawurlencode($cipherTool->encrypt('1|'.$email.'|')).(isset($url['query'])? '&'.$url['query']: '').(isset($lp)? '&lp='.$lp: ''));
|
||||
// Tools::redirectLink($link->getPageLink('authentication.php').'?create_account=1&sponsor='.rawurlencode($cipherTool->encrypt('1|'.$email.'|')).(isset($url['query'])? '&'.$url['query']: ''));
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
_ts.type = 'text/javascript';
|
||||
_ts.charset = 'utf-8';
|
||||
_ts.async = true;
|
||||
_ts.src = 'http://widgets.trustedshops.com/js/' + _tsid + '.js';
|
||||
_ts.src = 'https://widgets.trustedshops.com/js/' + _tsid + '.js';
|
||||
var __ts = document.getElementsByTagName('script')[0];
|
||||
__ts.parentNode.insertBefore(_ts, __ts);
|
||||
})();
|
||||
|
@ -17,7 +17,7 @@
|
||||
_ts.type = 'text/javascript';
|
||||
_ts.charset = 'utf-8';
|
||||
_ts.async = true;
|
||||
_ts.src = 'http://widgets.trustedshops.com/js/' + _tsid + '.js';
|
||||
_ts.src = 'https://widgets.trustedshops.com/js/' + _tsid + '.js';
|
||||
var __ts = document.getElementsByTagName('script')[0];
|
||||
__ts.parentNode.insertBefore(_ts, __ts);
|
||||
})();
|
||||
|
@ -204,7 +204,8 @@ class FrontController extends FrontControllerCore {
|
||||
$navigationPipe = (Configuration::get('PS_NAVIGATION_PIPE') ? Configuration::get('PS_NAVIGATION_PIPE') : '>');
|
||||
$smarty->assign('navigationPipe', $navigationPipe);
|
||||
|
||||
$protocol_link = (Configuration::get('PS_SSL_ENABLED') OR Tools::usingSecureMode()) ? 'https://' : 'http://';
|
||||
//$protocol_link = (Configuration::get('PS_SSL_ENABLED') OR Tools::usingSecureMode()) ? 'https://' : 'http://';
|
||||
$protocol_link = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')?'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,9 +281,11 @@ class FrontController extends FrontControllerCore {
|
||||
);
|
||||
|
||||
foreach ($assignArray as $assignKey => $assignValue)
|
||||
if (substr($assignValue, 0, 1) == '/' OR $protocol_content == 'https://')
|
||||
if (substr($assignValue, 0, 1) == '/' OR $protocol_content == 'https://') {
|
||||
$smarty->assign($assignKey, $protocol_content.Tools::getMediaServer($assignValue).$assignValue);
|
||||
else
|
||||
} else if (substr($assignValue, 0, 1) == '/' OR $protocol_link == 'https://') {
|
||||
$smarty->assign($assignKey, $protocol_link.Tools::getMediaServer($assignValue).$assignValue);
|
||||
} else
|
||||
$smarty->assign($assignKey, $assignValue);
|
||||
|
||||
// setting properties from global var
|
||||
|
@ -28,4 +28,44 @@ class Link extends LinkCore
|
||||
|
||||
return $base._MODULE_DIR_.'/'.Module::getModuleNameFromClass('AdminGuidePosts').'/';
|
||||
}
|
||||
|
||||
public function getPageLinkSsl($filename, $ssl = false, $id_lang = NULL)
|
||||
{
|
||||
global $cookie;
|
||||
if ($id_lang == NULL)
|
||||
$id_lang = (int)($cookie->id_lang);
|
||||
|
||||
if (array_key_exists($filename.'_'.$id_lang, self::$cache['page']) AND !empty(self::$cache['page'][$filename.'_'.$id_lang]))
|
||||
$uri_path = self::$cache['page'][$filename.'_'.$id_lang];
|
||||
else
|
||||
{
|
||||
if ($this->allow == 1)
|
||||
{
|
||||
$url_rewrite = '';
|
||||
if ($filename != 'index.php')
|
||||
{
|
||||
$pagename = substr($filename, 0, -4);
|
||||
$url_rewrite = Db::getInstance()->getValue('
|
||||
SELECT url_rewrite
|
||||
FROM `'._DB_PREFIX_.'meta` m
|
||||
LEFT JOIN `'._DB_PREFIX_.'meta_lang` ml ON (m.id_meta = ml.id_meta)
|
||||
WHERE id_lang = '.(int)($id_lang).' AND `page` = \''.pSQL($pagename).'\'');
|
||||
$uri_path = $this->getLangLink((int)$id_lang).($url_rewrite ? $url_rewrite : $filename);
|
||||
}
|
||||
else
|
||||
$uri_path = $this->getLangLink((int)$id_lang);
|
||||
}
|
||||
else
|
||||
{
|
||||
$uri_path = '';
|
||||
if ($filename != 'index.php')
|
||||
$uri_path = $filename;
|
||||
}
|
||||
self::$cache['page'][$filename.'_'.$id_lang] = $uri_path;
|
||||
}
|
||||
|
||||
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')?'https://':'http://';
|
||||
return $protocol.Tools::getShopDomainSsl().__PS_BASE_URI__.ltrim($uri_path, '/');
|
||||
}
|
||||
|
||||
}
|
@ -43,9 +43,10 @@
|
||||
<link rel="icon" type="image/vnd.microsoft.icon" href="{$img_ps_dir}favicon.ico?{$img_update_time}" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{$img_ps_dir}favicon.ico?{$img_update_time}" />
|
||||
{if isset($page_name) && $page_name == 'authentication'}
|
||||
<link rel="canonical" href="{$link->getPageLink('authentication.php', TRUE)}" />
|
||||
<link rel="canonical" href="{$link->getPageLinkSsl('authentication.php', TRUE)}" />
|
||||
{/if}
|
||||
<script type="text/javascript">
|
||||
var baseDirSsl = '{$base_dir_ssl}';
|
||||
var baseDir = '{$content_dir}';
|
||||
var static_token = '{$static_token}';
|
||||
var token = '{$token}';
|
||||
|
@ -49,9 +49,10 @@
|
||||
<link rel="icon" type="image/vnd.microsoft.icon" href="{$img_ps_dir}favicon.ico?{$img_update_time}" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{$img_ps_dir}favicon.ico?{$img_update_time}" />
|
||||
{if isset($page_name) && $page_name == 'authentication'}
|
||||
<link rel="canonical" href="{$link->getPageLink('authentication.php', TRUE)}" />
|
||||
<link rel="canonical" href="{$link->getPageLinkSsl('authentication.php', TRUE)}" />
|
||||
{/if}
|
||||
<script type="text/javascript">
|
||||
var baseDirSsl = '{$base_dir_ssl}';
|
||||
var baseDir = '{$content_dir}';
|
||||
var static_token = '{$static_token}';
|
||||
var token = '{$token}';
|
||||
|
Loading…
Reference in New Issue
Block a user