From 4d6924dc006dfa83e8d945f28d5ad48abdc64694 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 21 May 2009 12:00:06 +0000 Subject: - Patch #440778 by brianV: coding style fixes and documentation improvements. --- modules/upload/upload.admin.inc | 5 +++++ modules/upload/upload.install | 5 +++++ modules/upload/upload.module | 10 +++++----- modules/upload/upload.test | 8 +++++++- 4 files changed, 22 insertions(+), 6 deletions(-) (limited to 'modules') diff --git a/modules/upload/upload.admin.inc b/modules/upload/upload.admin.inc index 11866bace..6552f95a0 100644 --- a/modules/upload/upload.admin.inc +++ b/modules/upload/upload.admin.inc @@ -1,6 +1,11 @@ files)) { return; } - foreach($node->files as $file) { + foreach ($node->files as $file) { file_delete($file); } } @@ -560,16 +560,16 @@ function _upload_form($node) { if (user_access('upload files')) { $limits = _upload_file_limits($user); - $limit_description = t('The maximum size of file uploads is %filesize. ', array('%filesize' => format_size($limits['file_size']))); + $limit_description = t('The maximum size of file uploads is %filesize.', array('%filesize' => format_size($limits['file_size']))) . ' '; if (!empty($limits['resolution'])) { if (image_get_toolkit()) { - $limit_description .= t('Images larger than %resolution will be resized. ', array('%resolution' => $limits['resolution'])); + $limit_description .= t('Images larger than %resolution will be resized.', array('%resolution' => $limits['resolution'])) . ' '; } else { - $limit_description .= t('Images may not be larger than %resolution. ', array('%resolution' => $limits['resolution'])); + $limit_description .= t('Images may not be larger than %resolution.', array('%resolution' => $limits['resolution'])) . ' '; } } - $limit_description .= t('Only files with the following extensions may be uploaded: %extensions. ', array('%extensions' => $limits['extensions'])); + $limit_description .= t('Only files with the following extensions may be uploaded: %extensions.', array('%extensions' => $limits['extensions'])) . ' '; $form['new']['#weight'] = 10; $form['new']['upload'] = array( diff --git a/modules/upload/upload.test b/modules/upload/upload.test index ffbfd8680..7c07c516d 100644 --- a/modules/upload/upload.test +++ b/modules/upload/upload.test @@ -1,6 +1,12 @@ filepath; $this->uploadFile($node, $html_file); - $this->assertNoRaw(t('The specified file %name could not be uploaded.', array('%name' => basename($html_file))), t('File '. $html_file . ' was allowed to be uploaded')); + $this->assertNoRaw(t('The specified file %name could not be uploaded.', array('%name' => basename($html_file))), t('File ' . $html_file . ' was allowed to be uploaded')); } /** -- cgit v1.2.3