Merge branch 'wip-MDL-35542-master' of git://github.com/marinaglancy/moodle

This commit is contained in:
Dan Poltawski 2012-09-24 14:36:43 +08:00
commit dbffd9910d

View File

@ -506,6 +506,10 @@ class repository_dropbox extends repository {
*/
public function get_link($reference) {
$ref = unserialize($reference);
if (!isset($ref->url)) {
$this->dropbox->set_access_token($ref->access_key, $ref->access_secret);
$ref->url = $this->dropbox->get_file_share_link($ref->path, self::GETFILE_TIMEOUT);
}
return $this->get_file_download_link($ref->url);
}