Commit 0dfc8e05 authored by Dries's avatar Dries
Browse files

- Patch #41437 by webchick: improved code comments.

parent db427455
......@@ -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
*/
......
......@@ -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];
......
......@@ -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];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment