47 lines
1.9 KiB
Diff
47 lines
1.9 KiB
Diff
--- a/classes/Link.php 2026-06-20 20:05:45.983104609 +0000
|
|
+++ b/classes/Link.php 2026-06-20 20:05:46.195748630 +0000
|
|
@@ -862,7 +862,7 @@
|
|
public function getAdminBaseLink($idShop = null, $ssl = null, $relativeProtocol = false)
|
|
{
|
|
if (null === $ssl) {
|
|
- $ssl = Configuration::get('PS_SSL_ENABLED');
|
|
+ $ssl = Tools::usingSecureMode();
|
|
}
|
|
|
|
if (Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE')) {
|
|
@@ -881,9 +881,10 @@
|
|
}
|
|
|
|
if ($relativeProtocol) {
|
|
- $base = '//' . ($ssl && $this->ssl_enable ? $shop->domain_ssl : $shop->domain);
|
|
+ $base = '//' . Tools::getHttpHost(false, false, true);
|
|
} else {
|
|
- $base = (($ssl && $this->ssl_enable) ? 'https://' . $shop->domain_ssl : 'http://' . $shop->domain);
|
|
+ $protocol = Tools::usingSecureMode() ? 'https://' : 'http://';
|
|
+ $base = $protocol . Tools::getHttpHost(false, false, true);
|
|
}
|
|
|
|
return $base . $shop->getBaseURI();
|
|
@@ -1391,7 +1392,7 @@
|
|
public function getBaseLink($idShop = null, $ssl = null, $relativeProtocol = false)
|
|
{
|
|
if (null === $ssl) {
|
|
- $ssl = Configuration::get('PS_SSL_ENABLED');
|
|
+ $ssl = Tools::usingSecureMode();
|
|
}
|
|
|
|
if (Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE') && $idShop !== null) {
|
|
@@ -1401,9 +1402,10 @@
|
|
}
|
|
|
|
if ($relativeProtocol) {
|
|
- $base = '//' . ($ssl && $this->ssl_enable ? $shop->domain_ssl : $shop->domain);
|
|
+ $base = '//' . Tools::getHttpHost(false, false, true);
|
|
} else {
|
|
- $base = (($ssl && $this->ssl_enable) ? 'https://' . $shop->domain_ssl : 'http://' . $shop->domain);
|
|
+ $protocol = Tools::usingSecureMode() ? 'https://' : 'http://';
|
|
+ $base = $protocol . Tools::getHttpHost(false, false, true);
|
|
}
|
|
|
|
return $base . $shop->getBaseURI();
|