mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'MDL-69006-master' of git://github.com/bmbrands/moodle
This commit is contained in:
commit
01f6be2cff
@ -60,12 +60,16 @@ class flickr_client extends oauth_helper {
|
||||
* @param moodle_url|string $callbackurl
|
||||
*/
|
||||
public function __construct($consumerkey, $consumersecret, $callbackurl = '') {
|
||||
global $CFG;
|
||||
$version = moodle_major_version();
|
||||
$useragent = "MoodleSite/$version (+{$CFG->wwwroot})";
|
||||
|
||||
parent::__construct([
|
||||
'api_root' => self::OAUTH_ROOT,
|
||||
'oauth_consumer_key' => $consumerkey,
|
||||
'oauth_consumer_secret' => $consumersecret,
|
||||
'oauth_callback' => $callbackurl,
|
||||
'http_options' => ['CURLOPT_USERAGENT' => $useragent]
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,11 @@ class oauth_helper {
|
||||
$this->access_token_secret = $args['access_token_secret'];
|
||||
}
|
||||
$this->http = new curl(array('debug'=>false));
|
||||
$this->http_options = array();
|
||||
if (!empty($args['http_options'])) {
|
||||
$this->http_options = $args['http_options'];
|
||||
} else {
|
||||
$this->http_options = array();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user