fix(prestashop): image edubox-prestashop fonctionne en local et derrière proxy
- 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
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
--- a/controllers/admin/AdminDashboardController.php
|
||||
+++ b/controllers/admin/AdminDashboardController.php
|
||||
@@ -330,43 +330,9 @@
|
||||
|
||||
protected function getWarningDomainName()
|
||||
{
|
||||
- $warning = false;
|
||||
- if (Shop::isFeatureActive()) {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- $shop = Context::getContext()->shop;
|
||||
- if ($_SERVER['HTTP_HOST'] != $shop->domain && $_SERVER['HTTP_HOST'] != $shop->domain_ssl && Tools::getValue('ajax') == false) {
|
||||
- $warning = $this->trans('You are currently connected under the following domain name:', [], 'Admin.Dashboard.Notification') . ' <span style="color: #CC0000;">' . $_SERVER['HTTP_HOST'] . '</span><br />';
|
||||
- if (Configuration::get('PS_MULTISHOP_FEATURE_ACTIVE')) {
|
||||
- $warning .= $this->trans(
|
||||
- 'This is different from the shop domain name set in the Multistore settings: "%s".',
|
||||
- [
|
||||
- '%s' => $shop->domain,
|
||||
- ],
|
||||
- 'Admin.Dashboard.Notification'
|
||||
- ) . $this->trans(
|
||||
- 'If this is your main domain, please {link}change it now{/link}.',
|
||||
- [
|
||||
- '{link}' => '<a href="' . $this->context->link->getAdminLink('AdminShopUrl', true, [], ['id_shop_url' => (int) $shop->id, 'updateshop_url' => 1]) . '">',
|
||||
- '{/link}' => '</a>',
|
||||
- ],
|
||||
- 'Admin.Dashboard.Notification'
|
||||
- );
|
||||
- } else {
|
||||
- $warning .= $this->trans('This is different from the domain name set in the "SEO & URLs" tab.', [], 'Admin.Dashboard.Notification') . '
|
||||
- ' . $this->trans(
|
||||
- 'If this is your main domain, please {link}change it now{/link}.',
|
||||
- [
|
||||
- '{link}' => '<a href="' . $this->context->link->getAdminLink('AdminMeta') . '#meta_fieldset_shop_url">',
|
||||
- '{/link}' => '</a>',
|
||||
- ],
|
||||
- 'Admin.Dashboard.Notification'
|
||||
- );
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return $warning;
|
||||
+ // EduBox: instances use dynamic public domains behind a reverse proxy.
|
||||
+ // The domain stored during installation never matches the request host.
|
||||
+ return false;
|
||||
}
|
||||
|
||||
public function ajaxProcessRefreshDashboard()
|
||||
Reference in New Issue
Block a user