Permalink
Browse files

Code cleanup in excel_xml_export.php

Removed the specific logic to handle the extended text fields, which is
no longer required as the BugData API will automatically retrieve them
if needed. This is a leftover from the conversion from old, array-style
access to bug data (see 18ad379).

Furthermore, the call to bug_get() was redundant, since the result set
from filter_get_bug_rows() already contains BugData objects.

Fixes #14017

Also removes a useless line of code accidentally left in there by commit
b5450f3.
  • Loading branch information...
1 parent 46ff26e commit a3eec4b7b5e8f18f3de1a534db9fcfcc474cbd71 @dregad dregad committed Mar 9, 2012
Showing with 1 addition and 12 deletions.
  1. +1 −12 excel_xml_export.php
View
@@ -70,8 +70,6 @@
do {
foreach( $result as $t_row ) {
- $t_bug = null;
-
if ( is_blank( $f_export ) || in_array( $t_row->id, $f_bug_arr ) ) {
echo excel_get_start_row();
@@ -83,15 +81,7 @@
echo excel_format_plugin_column_value( $t_column, $t_row );
} else {
$t_function = 'excel_format_' . $t_column;
- if ( column_is_extended( $t_column ) ) {
- if( $t_bug === null ) {
- $t_bug = bug_get( $t_row->id, /* extended = */ true );
- }
- echo $t_function( $t_bug->$t_column );
- } else {
- $t_function = 'excel_format_' . $t_column;
- echo $t_function( $t_row );
- }
+ echo $t_function( $t_row );
}
}
@@ -106,7 +96,6 @@
if ( $t_more ) {
$t_page_number++;
$result = filter_get_bug_rows( $t_page_number, $t_per_page, $t_page_count, $t_bug_count );
- $t_more !== false;
}
} while ( $t_more );

0 comments on commit a3eec4b

Please sign in to comment.