Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Allow multiple parameters and clean up the way we go about handling defa... #15

Merged
merged 1 commit into from

1 participant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 19, 2012
  1. @brandonsavage
This page is out of date. Refresh to see the latest.
Showing with 18 additions and 2 deletions.
  1. +18 −2 BugzillaQuery.class.php
View
20 BugzillaQuery.class.php
@@ -191,7 +191,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
@@ -203,13 +207,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();
Something went wrong with that request. Please try again.