forked from science-ation/science-ation
reorganize the send_communication script to be more efficient
This commit is contained in:
parent
4bf5cb909f
commit
95c6381007
@ -43,13 +43,9 @@ if(file_exists("../data/communication.lock"))
|
|||||||
$headers="From: $from\r\nReply-To: $from\r\nReturn-Path: $from\r\n";
|
$headers="From: $from\r\nReply-To: $from\r\nReturn-Path: $from\r\n";
|
||||||
$x=1;
|
$x=1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(array_key_exists($to,$mailqueries))
|
if(array_key_exists($to,$mailqueries))
|
||||||
|
{
|
||||||
$q=mysql_query($mailqueries[$to]['query']);
|
$q=mysql_query($mailqueries[$to]['query']);
|
||||||
else
|
|
||||||
echo i18n("Unknown 'to' to send email communication to (%1)",array($to));
|
|
||||||
|
|
||||||
while($r=mysql_fetch_object($q))
|
while($r=mysql_fetch_object($q))
|
||||||
{
|
{
|
||||||
if($r->firstname && $r->lastname)
|
if($r->firstname && $r->lastname)
|
||||||
@ -70,6 +66,10 @@ if(file_exists("../data/communication.lock"))
|
|||||||
}
|
}
|
||||||
unlink("../data/communication.lock.$id");
|
unlink("../data/communication.lock.$id");
|
||||||
unlink("../data/communication.lock");
|
unlink("../data/communication.lock");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
echo i18n("Unknown 'to' to send email communication to (%1)",array($to));
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user