]> _ Git - cubeextranet.git/commitdiff
wait #4620 @0.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 30 Jul 2021 08:43:36 +0000 (08:43 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 30 Jul 2021 08:43:36 +0000 (08:43 +0000)
inc/ws/Controlleur/class.ws.url.php

index 2699a68b95db815f1d7f0366a222068ee1821f52..0344d07fd86bef0f5fb1587a3722cc1204c7501a 100644 (file)
@@ -1217,6 +1217,9 @@ html,body{height:100%;cursor: wait;font-family: "Open Sans", Arial;background-co
         $tmp = sys_get_temp_dir() . '/ysl_survey_' . time() . '.xlsx';
         $writer->save($tmp);
 
+        $dao = new wsDAOBook($core->con);
+        $book = $dao->selectById($bid);
+
         $head = ['Date', 'Page', 'Rating', 'Country', 'Function', 'Suggestions'];
         $sql = "SELECT * FROM ysl_survey WHERE fluidbook_id='" . $core->con->escape($bid) . "' ORDER BY date ASC";
 
@@ -1229,7 +1232,7 @@ html,body{height:100%;cursor: wait;font-family: "Open Sans", Arial;background-co
         CubeIT_Excel::simple('Survey data #' . $bid, $data, $head, $tmp, 100);
 
         files::$mimeType['xlsx'] = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
-        cubeHTTP::downloadFile($tmp, 'ysl_survey_' . $bid . '.xlsx');
+        cubeHTTP::downloadFile($tmp, 'report-' . $bid . '-' . cubeText::str2URL($book->parametres->title) . '.xlsx');
     }
 
     public static function chooseExistingBook()