summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-07-08 08:04:50 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-07-08 08:04:50 +0000
commit00b642f86bab125f935f49f04ad38d2549e3ecc2 (patch)
treeed55173b1a0ab7462e95a273902ce3a5529d2574 /roundcubemail/program/steps
parentf2acdfe5ea515fd7770a9cb74d7abed9c6f9e995 (diff)
Check abort flag and display error message from plugin if available
git-svn-id: https://svn.roundcube.net/trunk@2725 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps')
-rw-r--r--roundcubemail/program/steps/mail/attachments.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/roundcubemail/program/steps/mail/attachments.inc b/roundcubemail/program/steps/mail/attachments.inc
index 52c09b460..601570345 100644
--- a/roundcubemail/program/steps/mail/attachments.inc
+++ b/roundcubemail/program/steps/mail/attachments.inc
@@ -84,11 +84,11 @@ if (is_array($_FILES['_attachments']['tmp_name'])) {
$attachment = $RCMAIL->plugins->exec_hook('upload_attachment', $attachment);
- if ($attachment['status']) {
+ if ($attachment['status'] && !$attachment['abort']) {
$id = $attachment['id'];
// store new attachment in session
- unset($attachment['status']);
+ unset($attachment['status'], $attachment['abort']);
$_SESSION['compose']['attachments'][$id] = $attachment;
if (($icon = $_SESSION['compose']['deleteicon']) && is_file($icon)) {
@@ -116,6 +116,9 @@ if (is_array($_FILES['_attachments']['tmp_name'])) {
if ($err == UPLOAD_ERR_INI_SIZE || $err == UPLOAD_ERR_FORM_SIZE) {
$msg = rcube_label(array('name' => 'filesizeerror', 'vars' => array('size' => show_bytes(parse_bytes(ini_get('upload_max_filesize'))))));
}
+ else if ($attachment['error']) {
+ $msg = $attachment['error'];
+ }
else {
$msg = rcube_label('fileuploaderror');
}