Commit 4687fea0 authored by Robert Ricci's avatar Robert Ricci

Change TBLeaderMailList() to just return the empty string on an

error - it's too hard to destingish a string from 0 in php, and every
place we call this function, we've already made sure the group exists
anyway.
parent 55c3bd66
......@@ -1123,7 +1123,7 @@ function TBValidNodeType($type)
# usage TBLeaderMailList($pid, $gid)
# Uses default group (pid=gid) if gid not given.
# returns string like "Leader Name (uid) <email>[, ...]"
# returns 0 if not valid
# returns the empty string if not valid
function TBLeaderMailList($pid, $gid)
{
# No group, then use the default group.
......@@ -1138,7 +1138,7 @@ function TBLeaderMailList($pid, $gid)
"order by trust DESC, usr_name");
if (mysql_num_rows($query_result) == 0) {
return 0;
return "";
}
$mailstr="";
while ($row = mysql_fetch_array($query_result)) {
......
......@@ -759,8 +759,7 @@ $leader_name = $row[0];
$leader_email = $row[1];
$leader_uid = $row[2];
if (($allleaders = TBLeaderMailList($pid,$gid)) == 0)
$allleaders = "";
$allleaders = TBLeaderMailList($pid,$gid);
#
# The mail message to the leader. We send this for returning users
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment