From 2e9ddb98af5c5b8aee36556d64bee8ca94b2b171 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sat, 2 Apr 2005 18:24:56 +0000 Subject: [PATCH] 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! --- mod/exercise/upload.php | 2 +- mod/workshop/upload.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/exercise/upload.php b/mod/exercise/upload.php index 83b0b006826..9d19cf27bda 100644 --- a/mod/exercise/upload.php +++ b/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)) { diff --git a/mod/workshop/upload.php b/mod/workshop/upload.php index 29fb7761102..ad6aa0d8b01 100644 --- a/mod/workshop/upload.php +++ b/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");