From: Vincent Zanotti Date: Tue, 19 May 2009 13:07:32 +0000 (+0200) Subject: Displays an error message when attachment are too large in the X.net bulk email sender. X-Git-Tag: xorg/0.10.1~86 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=eab2f6f5f15c04fa35a5e5b89e2853370b74a3eb;p=platal.git Displays an error message when attachment are too large in the X.net bulk email sender. Signed-off-by: Vincent Zanotti --- diff --git a/modules/xnetgrp.php b/modules/xnetgrp.php index eed2975..72a7bef 100644 --- a/modules/xnetgrp.php +++ b/modules/xnetgrp.php @@ -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();