From d80444efe7ae05bf2e3bebcb0a286077e805231e Mon Sep 17 00:00:00 2001 From: dongsheng Date: Fri, 29 May 2009 09:18:55 +0000 Subject: [PATCH] "MDL-19180, repository url plugin, fixed undefined index" --- repository/url/repository.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/repository/url/repository.class.php b/repository/url/repository.class.php index 7df80e0728..666974cef1 100755 --- a/repository/url/repository.class.php +++ b/repository/url/repository.class.php @@ -21,7 +21,9 @@ class repository_url extends repository { public function __construct($repositoryid, $context = SITEID, $options = array()){ global $SESSION, $action, $CFG; parent::__construct($repositoryid, $context, $options); - $this->client_id = $options['client_id']; + if (!empty($options['client_id'])) { + $this->client_id = $options['client_id']; + } $this->file_url = optional_param('download_from', '', PARAM_RAW); } @@ -31,7 +33,6 @@ class repository_url extends repository { $fp = fopen($path, 'w'); $c = new curl; $c->download(array(array('url'=>$url, 'file'=>$fp))); - return $path; } -- 2.39.5