MDL-60733 core: B/C for google_oauth

The google_oauth class extends oauth2client which was modified to send "Accept" headers.

The "Accept" headers break picasa and could break any other plugin that was using google_oauth.
This commit is contained in:
Damyon Wiese
2017-11-08 15:25:37 +08:00
parent 14f2ce60a7
commit 306a3eba3f
2 changed files with 18 additions and 2 deletions
+13
View File
@@ -448,4 +448,17 @@ class google_oauth extends oauth2_client {
$this->header = array();
$this->response = array();
}
/**
* Make a HTTP request, we override the parents because we do not
* want to send accept headers (this was a change in the parent class and we want to keep the old behaviour).
*
* @param string $url The URL to request
* @param array $options
* @param mixed $acceptheader Not used.
* @return bool
*/
protected function request($url, $options = array(), $acceptheader = 'application/json') {
return parent::request($url, $options, false);
}
}