Displays an error message when attachment are too large in the X.net bulk email sender.
authorVincent Zanotti <vincent.zanotti@m4x.org>
Tue, 19 May 2009 13:07:32 +0000 (15:07 +0200)
committerVincent Zanotti <vincent.zanotti@m4x.org>
Tue, 19 May 2009 13:07:32 +0000 (15:07 +0200)
Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
modules/xnetgrp.php

index eed2975..72a7bef 100644 (file)
@@ -325,7 +325,13 @@ class XnetGrpModule extends PLModule
             $this->load('mail.inc.php');
             set_time_limit(120);
             $tos = get_all_redirects($mbr,  $mls, $mmlist);
+
             $upload = PlUpload::get($_FILES['uploaded'], S::user()->login(), 'xnet.emails', true);
+            if (!$upload && @$_FILES['uploaded']['name'] && PlUpload::$lastError != null) {
+                $page->trigError(PlUpload::$lastError);
+                return;
+            }
+
             send_xnet_mails($from, $sujet, $body, Env::v('wiki'), $tos, Post::v('replyto'), $upload, @$_FILES['uploaded']['name']);
             if ($upload) {
                 $upload->rm();