Merge remote-tracking branch 'origin/ticket/r15782-stats' into develop
This commit is contained in:
commit
b59f0e70b1
@ -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 '<p class="conf">'.$this->l('Export complete.').
|
||||
' <a onclick="window.open(this.href); return false;" href="'.(Tools::usingSecureMode() ? 'https://' : 'http://').$_SERVER['SERVER_NAME'].'/modules/stats_logistic/'.$fname.'">'.
|
||||
' <a onclick="window.open(this.href); return false;" href="'.Tools::getShopDomain(true).'/modules/stats_logistic/'.$fname.'">'.
|
||||
$this->l('Click here to download the file').'</a></p>';
|
||||
} else {
|
||||
echo '<p class="conf">'.$this->l('No result for these dates.').'</p>';
|
||||
@ -599,7 +599,7 @@ class AdminStatsLogistic extends AdminTab
|
||||
echo '<br><br><h2 style="margin-top:15px">Export Remboursements</h2>
|
||||
<fieldset>
|
||||
<p>Exporter le détail des ventes dont la date de début est comprise entre : </p>
|
||||
<form method="POST" action="'.(Tools::usingSecureMode() ? 'https://' : 'http://').$_SERVER['SERVER_NAME'].'/modules/stats_logistic/ajax.php?action=export">'
|
||||
<form method="POST" action="'.Tools::getShopDomain(true).'/modules/stats_logistic/ajax.php?action=export">'
|
||||
.'<span class="form-group">'
|
||||
.'<label style="float: none;" class="control-label" for="date_export_begin">Date de début :</label>'
|
||||
.'<input type="date" name="date_export_begin" value="'.pSQl($this->date_export_begin).'" id="date_export_begin" class="form-control" />'
|
||||
|
@ -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.'';
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user