Skip to content

Commit

Permalink
Remove tests already settled in prepare_options()
Browse files Browse the repository at this point in the history
  • Loading branch information
rdalverny committed Sep 27, 2016
1 parent 78434ec commit 2295f67
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions BugzillaOutput.class.php
Expand Up @@ -85,28 +85,7 @@ protected function setup_template_data() {
$this->response->bugs = $this->query->data['bugs'];
}

// Set the field data for the templates
if( isset($this->query->options['include_fields']) &&
!empty($this->query->options['include_fields']) ) {
// User specified some fields
if (!is_array($this->query->options['include_fields'])) {
$tmp = @explode(',', $this->query->options['include_fields']);
} else {
$tmp = &$this->query->options['include_fields'];
}
foreach( $tmp as $tmp_field ) {
$field = trim($tmp_field);
// Catch if the user specified the same field multiple times
if( !empty($field) &&
!in_array($field, $this->response->fields) ) {
array_push($this->response->fields, $field);
}
}
}else {
// If the user didn't specify any fields in the query config use
// default fields
$this->response->fields = $wgBugzillaDefaultFields;
}
$this->response->fields = $this->query->options['include_fields'];
}

}
Expand Down

0 comments on commit 2295f67

Please sign in to comment.