diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-12-17 17:24:46 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-12-17 17:24:46 +0000 |
commit | 0dfc8e059f24f10f0e23797ea6635cfde6704c07 (patch) | |
tree | 027e912ab4f385f60bee2811f44c6cf8a16ad379 | |
parent | db42745522a2838112f827bee0201e0ada23cb39 (diff) | |
download | brdo-0dfc8e059f24f10f0e23797ea6635cfde6704c07.tar.gz brdo-0dfc8e059f24f10f0e23797ea6635cfde6704c07.tar.bz2 |
- Patch #41437 by webchick: improved code comments.
-rw-r--r-- | includes/file.inc | 3 | ||||
-rw-r--r-- | modules/upload.module | 1 | ||||
-rw-r--r-- | modules/upload/upload.module | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/includes/file.inc b/includes/file.inc index dbd981bb2..91aa484f1 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -131,7 +131,8 @@ function file_check_path(&$path) { } /** - * Check if $source is a valid file upload. + * Check if $source is a valid file upload. If so, process $_FILES + * and return its contents as an object. * * @param $source */ diff --git a/modules/upload.module b/modules/upload.module index 1da1bc128..d5c7a49bd 100644 --- a/modules/upload.module +++ b/modules/upload.module @@ -190,6 +190,7 @@ function upload_nodeapi(&$node, $op, $arg) { // Double check existing files: if (is_array($node->list)) { foreach ($node->list as $key => $value) { + // Ensure file is valid and retrieve contents of $_FILES array if ($file = file_check_upload($key)) { $node->files[$file->source] = $file; $node->files[$key]->list = $node->list[$key]; diff --git a/modules/upload/upload.module b/modules/upload/upload.module index 1da1bc128..d5c7a49bd 100644 --- a/modules/upload/upload.module +++ b/modules/upload/upload.module @@ -190,6 +190,7 @@ function upload_nodeapi(&$node, $op, $arg) { // Double check existing files: if (is_array($node->list)) { foreach ($node->list as $key => $value) { + // Ensure file is valid and retrieve contents of $_FILES array if ($file = file_check_upload($key)) { $node->files[$file->source] = $file; $node->files[$key]->list = $node->list[$key]; |