Don't try to email admins multiple times
This commit is contained in:
committed by
WineHQ
parent
71db072912
commit
89fa871033
@@ -682,8 +682,6 @@ class User {
|
|||||||
function get_notify_email_address_list($iAppId = null, $iVersionId = null)
|
function get_notify_email_address_list($iAppId = null, $iVersionId = null)
|
||||||
{
|
{
|
||||||
$aUserId = array();
|
$aUserId = array();
|
||||||
$c = 0;
|
|
||||||
$retval = "";
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Retrieve version maintainers.
|
* Retrieve version maintainers.
|
||||||
@@ -695,10 +693,7 @@ class User {
|
|||||||
if(mysql_num_rows($hResult) > 0)
|
if(mysql_num_rows($hResult) > 0)
|
||||||
{
|
{
|
||||||
while($oRow = mysql_fetch_object($hResult))
|
while($oRow = mysql_fetch_object($hResult))
|
||||||
{
|
$aUserId[] = $oRow->userId;
|
||||||
$aUserId[$c] = array($oRow->userId);
|
|
||||||
$c++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -731,10 +726,7 @@ class User {
|
|||||||
if(mysql_num_rows($hResult) > 0)
|
if(mysql_num_rows($hResult) > 0)
|
||||||
{
|
{
|
||||||
while($oRow = mysql_fetch_object($hResult))
|
while($oRow = mysql_fetch_object($hResult))
|
||||||
{
|
$aUserId[] = $oRow->userId;
|
||||||
$aUserId[$c] = array($oRow->userId);
|
|
||||||
$c++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -751,26 +743,23 @@ class User {
|
|||||||
// if we didn't find this entry in the $aUserId
|
// if we didn't find this entry in the $aUserId
|
||||||
// array then we should add it
|
// array then we should add it
|
||||||
if($i === false)
|
if($i === false)
|
||||||
{
|
$aUserId[] = $oRow->userid;
|
||||||
$aUserId[$c] = array($oRow->userid);
|
|
||||||
$c++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// go through the email entries and only add the emails for the users
|
// go through the email entries and only add the emails for the users
|
||||||
// that want to receive it
|
// that want to receive it
|
||||||
if ($c > 0)
|
if (sizeof($aUserId) > 0)
|
||||||
{
|
{
|
||||||
while(list($index, list($userIdValue)) = each($aUserId))
|
foreach($aUserId as $iUserId)
|
||||||
{
|
{
|
||||||
$oUser = new User($userIdValue);
|
$oUser = new User($iUserId);
|
||||||
if ($oUser->wantsEmail())
|
if ($oUser->wantsEmail())
|
||||||
$retval .= $oUser->sEmail." ";
|
$sRetval .= $oUser->sEmail." ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $retval;
|
return $sRetval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user