73b561ed33
- edubox-tools.patch : getShopDomain/Ssl conservent les ports non standards - edubox-configuration.patch : PS_SHOP_DOMAIN, _PS_BASE_URL_, PS_SSL_ENABLED… résolus dynamiquement - edubox-shop-getbaseurl.patch : Shop::getBaseURL() utilise le host de la requête - edubox-shopurl.patch : getMainShopDomain conserve les ports non standards - edubox-clear-cache-init.sh : vidage des caches à chaque démarrage - seed.ts : passage au tag 9-edubox-9 - README mis à jour avec les nouveaux patches
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, false);
|
|
} else {
|
|
- $base = (($ssl && $this->ssl_enable) ? 'https://' . $shop->domain_ssl : 'http://' . $shop->domain);
|
|
+ $protocol = Tools::usingSecureMode() ? 'https://' : 'http://';
|
|
+ $base = $protocol . Tools::getHttpHost(false, false, false);
|
|
}
|
|
|
|
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, false);
|
|
} else {
|
|
- $base = (($ssl && $this->ssl_enable) ? 'https://' . $shop->domain_ssl : 'http://' . $shop->domain);
|
|
+ $protocol = Tools::usingSecureMode() ? 'https://' : 'http://';
|
|
+ $base = $protocol . Tools::getHttpHost(false, false, false);
|
|
}
|
|
|
|
return $base . $shop->getBaseURI();
|