Fix result new lines
This commit is contained in:
parent
b73c989b00
commit
24848c2199
|
@ -102,10 +102,10 @@ function create_text_file($cfg, $body) {
|
|||
$file_path = $cfg["export"]["path"] . "/" . date('Y-m-d') . "__" . str_replace(" ", "_", $body->event_title) . "__" . $body->vote_round . ".txt";
|
||||
$header = "\n\n" . create_header($cfg, $body) .
|
||||
"\n\nAbstimm-ID | Stimme(n)" .
|
||||
"\n----------------------------------------------------------------------------";
|
||||
"\n----------------------------------------------------------------------------\n";
|
||||
file_put_contents($file_path, $header);
|
||||
foreach ($body->votes as $vote) {
|
||||
$line = $vote->hash . " | " . implode(", ", $vote->vote);
|
||||
$line = $vote->hash . " | " . implode(", ", $vote->vote) . "\n";
|
||||
file_put_contents($file_path, $line, FILE_APPEND);
|
||||
}
|
||||
shell_exec("gpg --yes --output " . $file_path . " --clearsign " . $file_path);
|
||||
|
|
Loading…
Reference in a new issue