Change result file name

This commit is contained in:
Sven Seeberg 2020-10-29 18:01:23 +01:00
parent 1f0bdb13e2
commit 1fac9d0564
Signed by: sven.seeberg
GPG key ID: 29559DD5A83806B5

View file

@ -102,7 +102,7 @@ function create_header($cfg, $body) {
}
function create_text_file($cfg, $body) {
$file_path = $cfg["export"]["path"] . "/" . date('Y-m-d') . "__" . str_replace(" ", "_", $body->event_title) . "__" . $body->vote_round . ".txt";
$file_path = $cfg["export"]["path"] . "/" . date('Y-m-d') . "__" . str_replace(" ", "_", $body->event_title) . "__Abstimmung-" . $body->vote_round . ".txt";
file_put_contents($file_path, create_header($cfg, $body));
foreach ($body->votes as $vote) {
$line = $vote->hash . " | " . implode(", ", $vote->vote) . "\n";