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);
}
$fp = fopen($path, 'w');
$c = new curl;
$c->download(array(array('url'=>$url, 'file'=>$fp)));
-
return $path;
}