Permalink
Browse files

Merge branch 'wip-MDL-35542-MOODLE_23_STABLE' of git://github.com/mar…

…inaglancy/moodle into MOODLE_23_STABLE
  • Loading branch information...
2 parents e1a809b + a7783bf commit bb6b275906ae0e762e7ce439138925bf92566191 @danpoltawski danpoltawski committed Sep 24, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 repository/dropbox/lib.php
@@ -506,6 +506,10 @@ public function supported_returntypes() {
*/
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);
}

0 comments on commit bb6b275

Please sign in to comment.