From 6d635e89f7abce42db9c242f4737345d2758815f Mon Sep 17 00:00:00 2001 From: james Date: Tue, 30 Oct 2007 22:37:18 +0000 Subject: [PATCH] Only get the recipients list once Oh, the last commit also fixed a couple multi-year registrationnumber uniquedness problems, as well as a few register_global dependencies --- admin/registration_receivedforms.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/admin/registration_receivedforms.php b/admin/registration_receivedforms.php index 7bad9218..0c8c95c7 100644 --- a/admin/registration_receivedforms.php +++ b/admin/registration_receivedforms.php @@ -217,14 +217,14 @@ echo mysql_Error(); else $projectnumber=$projectnum; + //get all students with this registration number + $recipients=getEmailRecipientsForRegistration($reg_id); + if($_POST['action']=="receivedyes") { //actually set it to 'complete' mysql_query("UPDATE registrations SET status='complete' WHERE num='$regnum' AND year='{$config['FAIRYEAR']}'"); - //get all students with this registration number - $recipients=getEmailRecipientsForRegistration($reg_id); - foreach($recipients AS $recip) { $to=$recip['to']; $subsub=array( @@ -250,9 +250,6 @@ echo mysql_Error(); //actually set it to 'paymentpending' mysql_query("UPDATE registrations SET status='paymentpending' WHERE num='$regnum' AND year='{$config['FAIRYEAR']}'"); - //get all students with this registration number - $recipients=getEmailRecipientsForRegistration($reg_id); - foreach($recipients AS $recip) { $to=$recip['to']; $subsub=array(