From eab2f6f5f15c04fa35a5e5b89e2853370b74a3eb Mon Sep 17 00:00:00 2001 From: Vincent Zanotti Date: Tue, 19 May 2009 15:07:32 +0200 Subject: [PATCH] Displays an error message when attachment are too large in the X.net bulk email sender. Signed-off-by: Vincent Zanotti --- modules/xnetgrp.php | 6 ++++++ 1 file changed, 6 insertions(+) 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(); -- 2.1.4