]> git.mjollnir.org Git - moodle.git/commitdiff
"MDL-20843, added missing in upload plugin"
authorDongsheng Cai <unoter@gmail.com>
Mon, 16 Nov 2009 02:20:13 +0000 (02:20 +0000)
committerDongsheng Cai <unoter@gmail.com>
Mon, 16 Nov 2009 02:20:13 +0000 (02:20 +0000)
repository/upload/repository.class.php

index 836dba12370b5c397a1ad333e009e5ee14298f3a..ead90dbc998ad38bba857f2c7a1569fd80bcc8af 100755 (executable)
@@ -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;