Skip to content

Commit

Permalink
Extra column in csv export when sponsorship_total >= 1000
Browse files Browse the repository at this point in the history
Bug introduced by commit 169b882.

Due to the use of number_format() function with default parameters, PHP
outputs the sponsorship amount formatted with ',' as a thousands
separator, which also happens to be MantisBT's default csv separator.
Since the fields are not escaped, this causes an extra column to be
generated.

Call to number_format() was removed, as it makes more sense to output
raw data in csv exports.

Fixes #13958
  • Loading branch information
dregad committed Feb 28, 2012
1 parent 64d9601 commit 1d2a035
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/csv_api.php
Expand Up @@ -420,5 +420,5 @@ function csv_format_due_date( $p_bug ) {
* @access public
*/
function csv_format_sponsorship_total( $p_bug ) {
return number_format( $p_bug->sponsorship_total );
return csv_escape_string( $p_bug->sponsorship_total );
}

0 comments on commit 1d2a035

Please sign in to comment.