Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions BugzillaQuery.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

use MediaWiki\MediaWikiServices;

// Factory class
class BugzillaQuery
{
Expand Down Expand Up @@ -276,7 +278,8 @@ public function _fetch_by_options()
{

// Add the requested query options to the request
$ua = MWHttpRequest::factory($this->url . '?'
$ua = MediaWikiServices::getInstance()->getHttpRequestFactory()
->create($this->url . '?'
. $this->_build_querystring($this->options),
[
'method' => 'GET',
Expand Down Expand Up @@ -353,7 +356,8 @@ protected function getJsonData($method, $params): bool
$query = json_encode($params, true);
$url = $this->url . "?method=$method&params=[" . urlencode($query) . "]";

$req = MWHttpRequest::factory($url, array(
$req = MediaWikiServices::getInstance()->getHttpRequestFactory()
->create($url, array(
'sslVerifyHost' => false,
'sslVerifyCert' => false
)
Expand Down Expand Up @@ -412,7 +416,8 @@ public function _fetch_by_options()
</methodCall>
X;

$ua = MWHttpRequest::factory($this->url, [
$ua = MediaWikiServices::getInstance()->getHttpRequestFactory()
->create($this->url, [
'method' => 'POST',
'follow_redirects' => true,
// TODO: Not sure if I should do this
Expand Down