Merge branch 'dropbox-api-bump-for-master' of git://git.luns.net.uk/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2011-11-28 00:08:31 +01:00
commit 1ff31a54a2
2 changed files with 4 additions and 13 deletions

View File

@ -66,7 +66,7 @@ class repository_dropbox extends repository {
'oauth_consumer_key'=>$this->dropbox_key,
'oauth_consumer_secret'=>$this->dropbox_secret,
'oauth_callback' => $this->callback->out(false),
'api_root' => 'http://www.dropbox.com/0/oauth',
'api_root' => 'https://www.dropbox.com/1/oauth',
);
$this->dropbox = new dropbox($args);
@ -96,7 +96,7 @@ class repository_dropbox extends repository {
$ret['login'] = array($popup_btn);
return $ret;
} else {
echo '<a target="_blank" href="'.$this->flickr->auth().'">'.get_string('login', 'repository').'</a>';
echo '<a target="_blank" href="'.$url.'">'.get_string('login', 'repository').'</a>';
}
}

View File

@ -35,9 +35,9 @@ class dropbox extends oauth_helper {
/** dropbox access type, can be dropbox or sandbox */
private $mode = 'dropbox';
/** dropbox api url*/
private $dropbox_api = 'http://api.dropbox.com/0';
private $dropbox_api = 'https://api.dropbox.com/1';
/** dropbox content api url*/
private $dropbox_content_api = 'http://api-content.dropbox.com/0';
private $dropbox_content_api = 'https://api-content.dropbox.com/1';
function __construct($args) {
parent::__construct($args);
@ -52,15 +52,6 @@ class dropbox extends oauth_helper {
return $data;
}
/**
* Get user account info
*/
public function get_account_info($token, $secret) {
$url = $this->dropbox_api.'/account/info';
$content = $this->get($url, array(), $token, $secret);
return $content;
}
/**
* Download a file
*/