if ($vid != $cur['vid']) { // if the vote id changes, then starts a new line
fputcsv($csv, $line, $sep, $enc); // stores the former line into $csv_output
$vid = $cur['vid'];
$line = array_fill(0, $nbf, ''); // creates an array full of empty string
$line[0] = $vid_; // the first field is a 'clean' vote id (not the one stored in database)
if ($this->isMode(self::MODE_XIDENT)) { // if the mode is non anonymous
if ($vid != $cur['vid']) { // if the vote id changes, then starts a new line
fputcsv($csv, $line, $sep, $enc); // stores the former line into $csv_output
$vid = $cur['vid'];
$line = array_fill(0, $nbf, ''); // creates an array full of empty string
$line[0] = $vid_; // the first field is a 'clean' vote id (not the one stored in database)
if ($this->isMode(self::MODE_XIDENT)) { // if the mode is non anonymous