Skip to content
Browse files

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!
  • Loading branch information...
1 parent 965f6d9 commit 2e9ddb98af5c5b8aee36556d64bee8ca94b2b171 stronk7 committed
Showing with 2 additions and 2 deletions.
  1. +1 −1 mod/exercise/upload.php
  2. +1 −1 mod/workshop/upload.php
View
2 mod/exercise/upload.php
@@ -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)) {
View
2 mod/workshop/upload.php
@@ -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");

0 comments on commit 2e9ddb9

Please sign in to comment.
Something went wrong with that request. Please try again.