From dfd86399c07794db856ad3ad4007792057d6c689 Mon Sep 17 00:00:00 2001 From: Neil Drumm Date: Tue, 2 Jan 2007 05:05:38 +0000 Subject: #106232 by chx. Add spaces for code style. --- modules/upload/upload.module | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/upload/upload.module') diff --git a/modules/upload/upload.module b/modules/upload/upload.module index 30bd9d3c0..6f8af3cde 100644 --- a/modules/upload/upload.module +++ b/modules/upload/upload.module @@ -293,7 +293,7 @@ function _upload_prepare(&$node) { // i.e. the user left the edit page, because they didn't want to upload anything. if(count($_POST) == 0) { if (is_array($_SESSION['file_previews']) && count($_SESSION['file_previews'])) { - foreach($_SESSION['file_previews'] as $fid => $file) { + foreach ($_SESSION['file_previews'] as $fid => $file) { file_delete($file->filepath); } unset($_SESSION['file_previews']); @@ -329,7 +329,7 @@ function _upload_prepare(&$node) { // Attach file previews to node object. if (is_array($_SESSION['file_previews']) && count($_SESSION['file_previews'])) { - foreach($_SESSION['file_previews'] as $fid => $file) { + foreach ($_SESSION['file_previews'] as $fid => $file) { if ($user->uid != 1) { // Here something.php.pps becomes something.php_.pps $file->filename = upload_munge_filename($file->filename, NULL, 0); @@ -404,7 +404,7 @@ function _upload_validate(&$node) { // Check if node->files exists, and if it contains something. if (is_array($node->files)) { // Update existing files with form data. - foreach($node->files as $fid => $file) { + foreach ($node->files as $fid => $file) { // Convert file to object for compatibility $file = (object)$file; @@ -653,7 +653,7 @@ function upload_munge_filename($filename, $extensions = NULL, $alerts = 1) { $new_filename = array_shift($filename_parts); // Remove file basename. $final_extension = array_pop($filename_parts); // Remove final extension. - foreach($filename_parts as $filename_part) { + foreach ($filename_parts as $filename_part) { $new_filename .= ".$filename_part"; if (!in_array($filename_part, $whitelist) && preg_match("/^[a-zA-Z]{2,5}\d?$/", $filename_part)) { $new_filename .= '_'; -- cgit v1.2.3