Skip to content

Commit

Permalink
Fix #12772: Add function to handle CSV formatting of sponsorship totals
Browse files Browse the repository at this point in the history
When exporting issues in CSV format a fatal error is thrown if the
export includes sponsorship totals. This is due to a missing
csv_format_sponsorship_total function.

Signed-off-by: David Hicks <hickseydr@optusnet.com.au>
  • Loading branch information
davethegr8 authored and davidhicks committed Feb 26, 2011
1 parent bd7a448 commit 169b882
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/csv_api.php
Expand Up @@ -412,3 +412,13 @@ function csv_format_due_date( $p_due_date ) {
$s_date_format = config_get( 'short_date_format' );
return csv_escape_string( date( $s_date_format, $p_due_date ) );
}

/**
* return the sponsorship total for an issue
* @param int $p_sponsorship_total
* @return string
* @access public
*/
function csv_format_sponsorship_total( $p_sponsorship_total ) {
return number_format( $p_sponsorship_total );
}

0 comments on commit 169b882

Please sign in to comment.