if ($t_show_realname) {
    echo csv_escape_string(lang_get('realname')) . $t_separator;
} else {
    echo csv_escape_string(lang_get('username')) . $t_separator;
}
echo csv_escape_string(lang_get('timestamp')) . $t_separator;
echo csv_escape_string(lang_get('minutes')) . $t_separator;
echo csv_escape_string(lang_get('time_tracking_time_spent')) . $t_separator;
if ($t_show_cost) {
    echo csv_escape_string('cost') . $t_separator;
}
echo csv_escape_string('note');
echo "\n";
foreach ($t_billing_rows as $t_billing) {
    echo csv_escape_string(bug_format_id($t_billing['bug_id'])) . $t_separator;
    echo csv_escape_string($t_billing['project_name']) . $t_separator;
    echo csv_escape_string($t_billing['bug_summary']) . $t_separator;
    if ($t_show_realname) {
        echo csv_escape_string($t_billing['reporter_realname']) . $t_separator;
    } else {
        echo csv_escape_string($t_billing['reporter_username']) . $t_separator;
    }
    echo csv_escape_string(date($t_date_format, $t_billing['date_submitted'])) . $t_separator;
    echo csv_escape_string($t_billing['minutes']) . $t_separator;
    echo csv_escape_string($t_billing['duration']) . $t_separator;
    if ($t_show_cost) {
        echo csv_escape_string($t_billing['cost']) . $t_separator;
    }
    echo csv_escape_string($t_billing['note']);
    echo "\n";
}
示例#2
0
/**
 * return the sponsorship total for an issue
 * @param object $p_bug the bug
 * @return string
 * @access public
 */
function csv_format_sponsorship_total($p_bug)
{
    return csv_escape_string($p_bug->sponsorship_total);
}
示例#3
0
echo $t_header;

# export the rows
foreach ( $t_rows as $t_row ) {
	$t_first_column = true;

	foreach ( $t_columns as $t_column ) {
		if ( !$t_first_column ) {
			echo $t_sep;
		} else {
			$t_first_column = false;
		}

		$t_custom_field = column_get_custom_field_name( $t_column );
		if ( $t_custom_field !== null ) {
			ob_start();
			$t_column_value_function = 'print_column_value';
			helper_call_custom_function( $t_column_value_function, array( $t_column, $t_row, COLUMNS_TARGET_CSV_PAGE ) );
			$t_value = ob_get_clean();

			echo csv_escape_string($t_value);
		} else {
			$t_function = 'csv_format_' . $t_column;
			echo $t_function( $t_row->$t_column );
		}
	}

	echo $t_nl;
}
示例#4
0
function csv_format_resolution($p_resolution)
{
    return csv_escape_string(get_enum_element('resolution', $p_resolution));
}
示例#5
0
function csv_format_selection($p_duplicate_id)
{
    return csv_escape_string('');
}
示例#6
0
/**
 * return the bug note count for an issue
 * @param BugData $p_bug A BugData object.
 * @return string
 * @access public
 */
function csv_format_bugnotes_count(BugData $p_bug)
{
    # grab the bugnote count
    $t_bugnote_stats = bug_get_bugnote_stats($p_bug->id);
    if ($t_bugnote_stats) {
        $t_bugnote_count = $t_bugnote_stats['count'];
    } else {
        $t_bugnote_count = 0;
    }
    return csv_escape_string($t_bugnote_count);
}
示例#7
0
文件: csv_api.php 项目: kaos/mantisbt
/**
 * return the due date column
 * @param int $p_due_date
 * @return string
 * @access public
 */
function csv_format_due_date($p_due_date)
{
    static $s_date_format = null;
    if ($s_date_format === null) {
        $s_date_format = config_get('short_date_format');
    }
    return csv_escape_string(date($s_date_format, $p_due_date));
}