From: Dongsheng Cai Date: Mon, 16 Nov 2009 02:20:13 +0000 (+0000) Subject: "MDL-20843, added missing in upload plugin" X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=f3b38030f8758e35c078a7d36d5f831dd018a30d;p=moodle.git "MDL-20843, added missing in upload plugin" --- diff --git a/repository/upload/repository.class.php b/repository/upload/repository.class.php index 836dba1237..ead90dbc99 100755 --- a/repository/upload/repository.class.php +++ b/repository/upload/repository.class.php @@ -21,14 +21,19 @@ class repository_upload extends repository { } /** + * Print a upload form * - * @param boolean $ajax - * @return mixed + * @return array */ - public function print_login($ajax = true) { + public function print_login() { return $this->get_listing(); } + /** + * Process uploaded file + * + * @return array + */ public function upload() { try { $this->info = $this->upload_to_filepool('repo_upload_file', 'user_draft', $this->filepath, $this->itemid); @@ -39,6 +44,7 @@ class repository_upload extends repository { } public function get_listing() { + global $CFG; $ret = array(); $ret['nologin'] = true; $ret['nosearch'] = true;