Replace $HTTP_POST_FILES to $_FILES because the old one is
"deprecated" in new PHP versions. Perhaps I should have used the upload manager but I'm not really sure if it's fully available under 14_STABLE and viewing other modules they use the $_FILES global, so I use such variable here too!
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
require_variable($id); // course module ID
|
||||
$timenow = time();
|
||||
|
||||
$newfile = $HTTP_POST_FILES["newfile"];
|
||||
$newfile = $_FILES["newfile"];
|
||||
|
||||
// get some esential stuff...
|
||||
if (! $cm = get_record("course_modules", "id", $id)) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
require_variable($id); // CM ID
|
||||
|
||||
$newfile = $HTTP_POST_FILES["newfile"];
|
||||
$newfile = $_FILES["newfile"];
|
||||
|
||||
if (! $cm = get_record("course_modules", "id", $id)) {
|
||||
error("Course Module ID was incorrect");
|
||||
|
||||
Reference in New Issue
Block a user