From b6c06391c3b0f8834e25953f032a27711395e730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Sat, 30 Dec 2006 06:15:33 +0000 Subject: [PATCH] If the admin has not modified the field for a personalized response to a maintainer application, do not include it in the e-mail sent to the user. --- admin/adminMaintainerQueue.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/admin/adminMaintainerQueue.php b/admin/adminMaintainerQueue.php index 6d1523e..320c2f4 100644 --- a/admin/adminMaintainerQueue.php +++ b/admin/adminMaintainerQueue.php @@ -11,6 +11,9 @@ require_once(BASE."include/maintainer.php"); require_once(BASE."include/application.php"); require_once(BASE."include/mail.php"); +/* The initial help text displayed in the admin's response field */ +$sReplyTextHelp = "Enter a personalized reason for accepting or rejecting the user's maintainer request here"; + $aClean = array(); //array of filtered user input $aClean['sSub'] = makeSafe( $_REQUEST['sSub'] ); @@ -19,10 +22,13 @@ $aClean['sAdd'] = makeSafe( $_REQUEST['sAdd'] ); $aClean['sReject'] = makeSafe( $_REQUEST['sReject'] ); $aClean['sReplyText'] = makeSafe( $_REQUEST['sReplyText'] ); +/* If the admin's response text has not been modified, it should not be included in the e-mail sent to the rejected/accepted maintainer */ +if($aClean['sReplyText'] == $sReplyTextHelp) + $aClean['sReplyText'] = ""; + if(!$_SESSION['current']->hasPriv("admin")) util_show_error_page_and_exit("Insufficient privileges."); - if ($aClean['sSub']) { if ($aClean['iMaintainerId']) @@ -61,7 +67,7 @@ if ($aClean['sSub']) //email response echo 'Email reply',"\n"; - echo "\n"; + echo "\n"; /* Add button */ echo '' ,"\n";