diff --git a/modules/giftvoucher/giftvoucher-header.tpl b/modules/giftvoucher/giftvoucher-header.tpl index ca4f208c..977367bd 100644 --- a/modules/giftvoucher/giftvoucher-header.tpl +++ b/modules/giftvoucher/giftvoucher-header.tpl @@ -1,5 +1,5 @@ - + - + diff --git a/modules/invite/sponsor.php b/modules/invite/sponsor.php index 9c702a24..65e1320f 100644 --- a/modules/invite/sponsor.php +++ b/modules/invite/sponsor.php @@ -3,9 +3,9 @@ include(dirname(__FILE__).'/../../config/config.inc.php'); include(dirname(__FILE__).'/../../init.php'); if(($sponsor = Tools::getValue('sponsor')) && strlen($sponsor) > 12) { - + setcookie('554b43403edef30d31412286d5098965', $sponsor, time() + 3600 * 24 * 365, '/', '.bebeboutik.com'); - + $email = base64_decode(strrev(substr($sponsor, 12))); if(count(Db::getInstance()->ExecuteS(' SELECT `id_customer` @@ -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']: '')); } } diff --git a/modules/trustedshopsbbb/views/rich_snippets.tpl b/modules/trustedshopsbbb/views/rich_snippets.tpl index 15a5b012..ebf9cdd7 100755 --- a/modules/trustedshopsbbb/views/rich_snippets.tpl +++ b/modules/trustedshopsbbb/views/rich_snippets.tpl @@ -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); })(); diff --git a/modules/trustedshopsbbb/views/rich_snippets_2.tpl b/modules/trustedshopsbbb/views/rich_snippets_2.tpl index 49dfac69..7b77dbed 100644 --- a/modules/trustedshopsbbb/views/rich_snippets_2.tpl +++ b/modules/trustedshopsbbb/views/rich_snippets_2.tpl @@ -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); })(); diff --git a/override/classes/FrontController.php b/override/classes/FrontController.php index 71b92e1c..e8fecc60 100755 --- a/override/classes/FrontController.php +++ b/override/classes/FrontController.php @@ -9,7 +9,7 @@ class FrontController extends FrontControllerCore { $useSSL = $this->ssl; } } - + public function displayHeader() { self::$smarty->assign(array( @@ -18,7 +18,7 @@ class FrontController extends FrontControllerCore { parent::displayHeader(); } - public function init() { + public function init() { global $useSSL, $cookie, $smarty, $cart, $iso, $defaultCountry, $protocol_link, $protocol_content, $link, $css_files, $js_files, $site_version; if (self::$initialized) @@ -35,7 +35,7 @@ class FrontController extends FrontControllerCore { header('Location: '.Tools::getShopDomainSsl(true).$_SERVER['REQUEST_URI']); exit(); } - + ob_start(); /* Loading default country */ @@ -79,7 +79,7 @@ class FrontController extends FrontControllerCore { global $currency; $currency = Tools::setCurrency(); - + /* Cart already exists */ if ((int)$cookie->id_cart) { @@ -168,7 +168,7 @@ class FrontController extends FrontControllerCore { $cart->id_address_invoice = 0; } } - + if (!$cart->nbProducts()) $cart->id_carrier = NULL; @@ -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 @@ -305,7 +308,7 @@ class FrontController extends FrontControllerCore { $this->iso = $iso; $this->setMedia(); } - + protected function canonicalRedirection() { global $link, $cookie; @@ -403,7 +406,7 @@ class FrontController extends FrontControllerCore { 'module-advsendtoafriend-sendtoafriend-form', 'featured', 'list-tag-sales', */ ); - + $countCols = count(array_keys($displayLeft + $displayRight, $page_name)); $addclass = ''; diff --git a/override/classes/Link.php b/override/classes/Link.php index 7e18b6f4..efcbe08d 100644 --- a/override/classes/Link.php +++ b/override/classes/Link.php @@ -25,7 +25,47 @@ class Link extends LinkCore private function moduleGuideDir($ssl) { $base = (($ssl AND Configuration::get('PS_SSL_ENABLED')) ? Tools::getShopDomainSsl(true) : Tools::getShopDomain(true)); - + 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, '/'); + } + } \ No newline at end of file diff --git a/themes/site/header.tpl b/themes/site/header.tpl index 1ee03659..5d43eef1 100755 --- a/themes/site/header.tpl +++ b/themes/site/header.tpl @@ -43,9 +43,10 @@ {if isset($page_name) && $page_name == 'authentication'} - + {/if}