summaryrefslogtreecommitdiff
path: root/modules/upload/upload.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/upload/upload.module')
-rw-r--r--modules/upload/upload.module10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/upload/upload.module b/modules/upload/upload.module
index 071f91aa9..ff0c82d44 100644
--- a/modules/upload/upload.module
+++ b/modules/upload/upload.module
@@ -169,7 +169,7 @@ function upload_nodeapi(&$node, $op, $arg) {
$total_usersize = upload_count_size($user->uid) + $filesize;
if ($maxsize && $total_size > $maxsize) {
- form_set_error('upload', t('Error attaching file %name: total file size exceeded', array('%name' => theme('placeholder', $file->filename))));
+ form_set_error('upload', t('The selected file %name can not be attached to this post, because it exceeded the maximum filesize of %max-size', array('%name' => theme('placeholder', $file->filename), '%max-size' => theme('placeholder', format_size($maxsize)))));
break;
}
@@ -207,13 +207,13 @@ function upload_nodeapi(&$node, $op, $arg) {
}
if ($error['extension'] == count($user->roles) && $user->uid != 1) {
- form_set_error('upload', t('Error attaching file %name: invalid extension', array('%name' => theme('placeholder', $file->filename))));
+ form_set_error('upload', t('The selected file %name can not be attached to this post, because it is only possible to attach files with the following extensions: %files-allowed', array('%files-allowed' => theme('placeholder', $extensions))));
}
elseif ($error['uploadsize'] == count($user->roles) && $user->uid != 1) {
- form_set_error('upload', t('Error attaching file %name: exceeds maximum file size', array('%name' => theme('placeholder', $file->filename))));
+ form_set_error('upload', t('The selected file %name can not be attached to this post, because it exceeded the maximum filesize of %maxsize', array('%name' => theme('placeholder', $file->filename), '%maxsize' => theme('placeholder', format_size($uploadsize)))));
}
elseif ($error['usersize'] == count($user->roles) && $user->uid != 1) {
- form_set_error('upload', t('Error attaching file %name: exceeds maximum file size', array('%name' => theme('placeholder', $file->filename))));
+ form_set_error('upload', t('The selected file %name can not be attached to this post, because the disk quota of %quota has been reached', array('%name' => theme('placeholder', $file->filename), '%quote' => theme('placeholder', format_size($usersize)))));
}
else {
$key = 'upload_'. count($_SESSION['file_uploads']);
@@ -412,7 +412,7 @@ function _upload_image($file) {
$result = image_scale($file->filepath, $file->filepath, $width, $height);
if ($result) {
$file->filesize = filesize($file->filepath);
- drupal_set_message(t('Your image was resized to fit within the maximum allowed resolution of %resolution pixels.', array('%resolution' => variable_get('upload_max_resolution', 0))));
+ drupal_set_message(t('The image was resized to fit within the maximum allowed resolution of %resolution pixels.', array('%resolution' => theme('placeholder', variable_get('upload_max_resolution', 0)))));
}
}
}