From: <sy...@us...> - 2005-02-11 12:14:15
|
Update of /cvsroot/tikiwiki/tiki In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9273 Modified Files: Tag: BRANCH-1-9 tiki-send_newsletters.php Log Message: introduce quicktags for newsletters not to have people thinking they can send every wiki format in a newsletter(hoping theme doesn't change too much things) Index: tiki-send_newsletters.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/tiki-send_newsletters.php,v retrieving revision 1.16.2.14 retrieving revision 1.16.2.15 diff -u -d -r1.16.2.14 -r1.16.2.15 --- tiki-send_newsletters.php 10 Feb 2005 16:27:48 -0000 1.16.2.14 +++ tiki-send_newsletters.php 11 Feb 2005 12:13:20 -0000 1.16.2.15 @@ -124,14 +124,14 @@ } $sent = 0; $unsubmsg = ''; - $errorMsg = ""; + $errors = array(); $users = $nllib->get_all_subscribers($_REQUEST["nlId"], $nl_info["unsubMsg"]); foreach ($users as $user) { $userEmail = $user["login"]; $email = $user["email"]; if ($email == "") { - $errorMsg .= "(".tra('User:').$userEmail."-".tra('Email:').")<br />"; + $errors[] = array("user"=>$userEmail, "email"=>""); continue; } if ($userEmail == "") @@ -152,15 +152,14 @@ $mail->buildMessage(); if ($mail->send(array($email))) $sent++; - elseif ($userEmail) - $errorMsg .= "(".tra('User:').$userEmail."-".tra('Email:').$email.")<br />"; else - $errorMsg .= tra('Email:').$email."<br />"; + $errors[] = array("user"=>$userEmail, "email"=>$email); } $smarty->assign('sent', $sent); $smarty->assign('emited', 'y'); - $smarty->assign('errorMsg', $errorMsg); + if (count($errors) > 0) + $smarty->assign_by_ref('errors', $errors); $nllib->replace_edition($_REQUEST["nlId"], $_REQUEST["subject"], $_REQUEST["data"], $sent); } @@ -213,7 +212,7 @@ } include_once("textareasize.php"); include_once ('lib/quicktags/quicktagslib.php'); -$quicktags = $quicktagslib->list_quicktags(0,-1,'taglabel_desc','','wiki'); +$quicktags = $quicktagslib->list_quicktags(0,-1,'taglabel_desc','','newsletters'); $smarty->assign_by_ref('quicktags', $quicktags["data"]); $smarty->assign_by_ref('templates', $templates["data"]); |