Skip to content
Snippets Groups Projects
Commit 0dfc8e05 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #41437 by webchick: improved code comments.

parent db427455
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment