Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #15 from brandonsavage/bug729259

Allow multiple parameters and clean up the way we go about handling defa...
  • Loading branch information...
commit fa11bbeb362699584479a83b36d7ed8a90fe5b21 2 parents 7ba55fd + e4865dd
@brandonsavage brandonsavage authored
Showing with 18 additions and 2 deletions.
  1. +18 −2 BugzillaQuery.class.php
View
20 BugzillaQuery.class.php
@@ -188,7 +188,11 @@ function __construct($type, $options, $title='') {
public function _fetch_by_options() {
// Set up our HTTP request
- $request = new HTTP_Request2($this->url,
+ $options_array = array();
+
+ $options_array = array(Net_Url2::OPTION_USE_BRACKETS => false);
+ $net_url2 = new Net_Url2($this->url, $options_array);
+ $request = new HTTP_Request2($net_url2,
HTTP_Request2::METHOD_GET,
array('follow_redirects' => TRUE,
// TODO: Not sure if I should do this
@@ -200,13 +204,25 @@ public function _fetch_by_options() {
// Save the real options
$saved_options = $this->options;
-
+
+ if(!isset($this->options['include_fields'])) {
+ $this->options['include_fields'] = array();
+ }
+
+ if(!is_array($this->options['include_fields'])) {
+ (array)$this->options['include_fields'];
+ }
+
// Add any synthetic fields to the options
if( !empty($this->synthetic_fields) ) {
$this->options['include_fields'] =
@array_merge((array)$this->options['include_fields'],
$this->synthetic_fields);
}
+
+ if(!empty($this->options['include_fields'])) {
+ $this->options['include_fields'] = implode(",", $this->options['include_fields']);
+ }
// Add the requested query options to the request
$url = $request->getUrl();
Please sign in to comment.
Something went wrong with that request. Please try again.