diff --git a/modules/stats_logistic/AdminStatsLogistic.php b/modules/stats_logistic/AdminStatsLogistic.php index 35c55fa4..9c63e6be 100755 --- a/modules/stats_logistic/AdminStatsLogistic.php +++ b/modules/stats_logistic/AdminStatsLogistic.php @@ -237,7 +237,7 @@ class AdminStatsLogistic extends AdminTab $fname = 'export-remb-'.$this->date_export_begin.'-'.$this->date_export_end.'.csv'; $this->exportCSV($result, $fname); echo '

'.$this->l('Export complete.'). - ' '. + ' '. $this->l('Click here to download the file').'

'; } else { echo '

'.$this->l('No result for these dates.').'

'; @@ -599,7 +599,7 @@ class AdminStatsLogistic extends AdminTab echo '

Export Remboursements

Exporter le détail des ventes dont la date de début est comprise entre :

-
' + ' .'' .'' .'' diff --git a/modules/stats_logistic/ajax.php b/modules/stats_logistic/ajax.php index f8c44b39..594c4405 100644 --- a/modules/stats_logistic/ajax.php +++ b/modules/stats_logistic/ajax.php @@ -26,8 +26,7 @@ switch ($action) { if (empty($start) || empty($end)) { $url = ''; } else { - $url = Tools::getCurrentUrlProtocolPrefix() . Tools::getShopDomain() . '/' . - 'modules/stats_logistic/ajax.php?action=check&token='.Tools::getValue('token'); + $url = Tools::getShopDomain(true) . '/modules/stats_logistic/ajax.php?action=check&token='.Tools::getValue('token'); } $cmd = dirname(__FILE__).'/bin/export.php --start '.$start.' --end '.$end.''; diff --git a/override/classes/Tools.php b/override/classes/Tools.php index 45710e19..8f864ff7 100755 --- a/override/classes/Tools.php +++ b/override/classes/Tools.php @@ -15,22 +15,13 @@ class Tools extends ToolsCore { $domain = htmlspecialchars($domain, ENT_COMPAT, 'UTF-8'); } if($http) { - $domain = (($_SERVER['SERVER_PORT'] == _PS_SSL_PORT_ || !empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PORT'] == '443') || Configuration::get('PS_SSL_ENABLED'))? 'https://': 'http://').$domain; + $domain = (($_SERVER['SERVER_PORT'] == _PS_SSL_PORT_ + || !empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' + || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PORT'] == '443') + || Configuration::get('PS_SSL_ENABLED')) ? 'https://': 'http://').$domain; } return $domain; - - // if(!($domain = Configuration::get( _PS_MOBILE_ ? 'PS_MOBILE_DOMAIN' : 'PS_SHOP_DOMAIN'))) { - // $domain = self::getHttpHost(); - // } - // if($entities) { - // $domain = htmlspecialchars($domain, ENT_COMPAT, 'UTF-8'); - // } - // if($http) { - // $domain = (($_SERVER['SERVER_PORT'] == _PS_SSL_PORT_ || !empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' || Configuration::get('PS_SSL_ENABLED'))? 'https://': 'http://').$domain; - // } - // return $domain; - } public static function getShopDomainSsl($http=FALSE, $entities=FALSE) {