From 2295f67bfc86f7c89c26de5cb9649eedf13d68bf Mon Sep 17 00:00:00 2001 From: Romain d'Alverny Date: Tue, 27 Sep 2016 11:46:07 +0200 Subject: [PATCH] Remove tests already settled in prepare_options() --- BugzillaOutput.class.php | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/BugzillaOutput.class.php b/BugzillaOutput.class.php index 1c8794d..15bb278 100644 --- a/BugzillaOutput.class.php +++ b/BugzillaOutput.class.php @@ -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']; } }