From 7ee244b1a44ae5afb341af5c617228cceee02456 Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Fri, 1 Nov 2013 16:23:34 +0800 Subject: [PATCH] MDL-42666 repository_boxnet: Disabling file references --- repository/boxnet/lib.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/repository/boxnet/lib.php b/repository/boxnet/lib.php index 9e29ae49e48..3be62a44cd9 100644 --- a/repository/boxnet/lib.php +++ b/repository/boxnet/lib.php @@ -341,12 +341,15 @@ class repository_boxnet extends repository { } /** - * Box.net supports file linking and copying + * Box.net supports copied and links. + * + * Theoretically this API is ready for references, though it only works for + * Box.net Business accounts, but it is not enabled because we are not supporting it. * * @return int */ public function supported_returntypes() { - return FILE_INTERNAL | FILE_EXTERNAL | FILE_REFERENCE; + return FILE_INTERNAL | FILE_EXTERNAL; } /** @@ -384,7 +387,7 @@ class repository_boxnet extends repository { $reference->downloadurl = ''; if (optional_param('usefilereference', false, PARAM_BOOL)) { try { - $shareinfo = $this->boxnetclient->share_file($reference->fileid, false); + $shareinfo = $this->boxnetclient->share_file($reference->fileid); } catch (moodle_exception $e) { throw new repository_exception('cannotcreatereference', 'repository_boxnet'); }