MDL-42666 repository_boxnet: Using the right reference

This commit is contained in:
Frederic Massart
2013-11-06 14:04:59 +08:00
parent eca84ae277
commit b1e4d7afc8
+1 -1
View File
@@ -425,7 +425,7 @@ class repository_boxnet extends repository {
* @return null|stdClass with attribute 'filepath'
*/
public function get_file_by_reference($reference) {
$reference = unserialize(self::convert_to_valid_reference($file->get_reference()));
$reference = unserialize(self::convert_to_valid_reference($reference->reference));
$url = $reference->downloadurl;
$c = new curl();
$c->get($url, null, array('timeout' => self::SYNCIMAGE_TIMEOUT, 'followlocation' => true, 'nobody' => true));