From: vincent@cubedesigners.com Date: Wed, 20 Oct 2021 15:24:34 +0000 (+0000) Subject: wait #4810 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=69f7abd9e592c83788ccda9b310ecc1cbcd608df;p=cubeextranet.git wait #4810 @0.5 --- diff --git a/inc/ws/Controlleur/class.ws.stats.php b/inc/ws/Controlleur/class.ws.stats.php index 616b0dde7..5b60b58f3 100644 --- a/inc/ws/Controlleur/class.ws.stats.php +++ b/inc/ws/Controlleur/class.ws.stats.php @@ -12,15 +12,21 @@ class wsStats public static function exportXLS($bid, $annee = null, $mois = null) { + global $core; + $dao = new wsDAOBook($core->con); $xname = self::_getXLSFile($bid, $annee, $mois); - $fname = 'stats_' . $bid; + $e = explode('_', $bid); + $book = $dao->selectById($e[0]); + + $fname = 'stats-' . $e[0]; if (!is_null($annee)) { - $fname .= '_' . $annee; + $fname .= '-' . $annee; if (!is_null($mois)) { - $fname .= '_' . $mois; + $fname .= '-' . $mois; } } - $fname .= '.xlsx'; + + $fname .= '-' . CubeIT_Text::str2URL($book->parametres->title) . '.xlsx'; files::$mimeType['xlsx'] = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';