These patches are maintained in an publicly accessible Arch repository, see: http://lists.eduforge.org/cgi-bin/archzoom.cgi/arch-eduforge@catalyst.net.nz--2004-MIRROR/moodle--eduforge--1.3.3
Index of arch patches in this commit:
arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-65
2004-09-15 22:31:09 GMT
Penny Leach <penny@catalyst.net.nz>
upload class now returns false in proprocess_files if there are no files (duh), + admin/uploaduser using upload class
Full logs:
Revision: moodle--eduforge--1.3.3--patch-65
Archive: arch-eduforge@catalyst.net.nz--2004
Creator: Penny Leach <penny@catalyst.net.nz>
Date: Thu Sep 16 10:31:09 NZST 2004
Standard-date: 2004-09-15 22:31:09 GMT
Modified-files: admin/uploaduser.php lib/uploadlib.php
New-patches: arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-65
Summary: upload class now returns false in proprocess_files if there are no files (duh), + admin/uploaduser using upload class
Keywords
/// If a file has been uploaded, then process it
- if ($filename = valid_uploaded_file($_FILES['userfile'])) {
+
+ require_once($CFG->dirroot.'/lib/uploadlib.php');
+ $um = new upload_manager('userfile',false,false,null,false,0);
+ if ($um->preprocess_files()) {
+ $filename = $um->files['userfile']['tmp_name'];
//Fix mac/dos newlines
$text = my_file_get_contents($filename);
}
}
}
+ if (!is_array($_FILES) || count($_FILES) == 0) {
+ return false;
+ }
$this->status = true;
return true; // if we've got this far it means that we're recovering so we want status to be ok.
}