mirror of
https://github.com/moodle/moodle.git
synced 2025-04-19 07:25:30 +02:00
MDL-57035 repository_skydrive: Compability with converged type apps
http://go.microsoft.com/fwlink/p/?LinkID=615760
This commit is contained in:
parent
282f0437f1
commit
cbca970ab7
@ -60,18 +60,6 @@ class microsoft_skydrive extends oauth2_client {
|
||||
$this->foldernamecache = cache::make('repository_skydrive', 'foldername');
|
||||
}
|
||||
|
||||
/**
|
||||
* Should HTTP GET be used instead of POST?
|
||||
*
|
||||
* The Microsoft API does not support POST, so we should use
|
||||
* GET instead (with the auth_token passed as a GET param).
|
||||
*
|
||||
* @return bool true if GET should be used
|
||||
*/
|
||||
protected function use_http_get() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the auth url for OAuth 2.0 request
|
||||
* @return string the auth url
|
||||
@ -88,6 +76,20 @@ class microsoft_skydrive extends oauth2_client {
|
||||
return 'https://login.live.com/oauth20_token.srf';
|
||||
}
|
||||
|
||||
/**
|
||||
* Post request.
|
||||
*
|
||||
* Overridden to convert the data to a string, else curl will set the wrong headers.
|
||||
*
|
||||
* @param string $url The URL.
|
||||
* @param array|string $params The parameters.
|
||||
* @param array $options The options.
|
||||
* @return bool
|
||||
*/
|
||||
public function post($url, $params = '', $options = array()) {
|
||||
return parent::post($url, format_postdata_for_curlcall($params), $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Downloads a file to a file from skydrive using authenticated request
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user