Commit: cc80bf349587d348d23f86ccb748360713542d2d Author: danbrown <[email protected]> Wed, 2 Oct 2013 08:31:39 -0400 Parents: 25bc5a5f1b89c63bef886e162f61548435a643e3 Branches: master
Link: http://git.php.net/?p=web/master.git;a=commitdiff;h=cc80bf349587d348d23f86ccb748360713542d2d Log: Changing mirror alerts to email new network status list. Changed paths: M manage/mirrors.php M scripts/mirror-summary M scripts/mirror-test Diff: diff --git a/manage/mirrors.php b/manage/mirrors.php index b1d7af7..a27c289 100644 --- a/manage/mirrors.php +++ b/manage/mirrors.php @@ -106,11 +106,11 @@ if (isset($id) && isset($hostname)) { $body .= wordwrap(unmangle($original_log),70); } @mail( - "[email protected]", + "[email protected]", "[mirrors] Update by $user.", $body, - "From: [email protected]", - "[email protected]" + "From: [email protected]", + "[email protected]" ); // If a mirror has been modified, send information safe for public eyes to the @@ -119,7 +119,7 @@ if (isset($id) && isset($hostname)) { $body = 'The mirror '.$hostname.' has been modified by '.$user.'. It\'s status is '; $body .= isset($active) && $active == true ? 'active.' : 'inactive, and DNS will be disabled.'; $body .= isset($acmt) && !empty($acmt) ? ' Notes were added to the mirror\'s file.' : ''; - @mail('[email protected]','[mirrors] Status change for '.$hostname,$body,"From: [email protected]\r\n", "[email protected]"); + @mail('[email protected]','[mirrors] Status change for '.$hostname,$body,"From: [email protected]\r\n", "[email protected]"); } } } else { @@ -461,7 +461,7 @@ function page_mirror_list($moreinfo = false) $addr = $found[1]; $name = str_replace("<$addr>", "", $maintainer); $emailcell = '<a href="mailto:' . $addr . '?subject=' . $row['hostname'] . - '&[email protected]">' . $name . ' <img src="/images/mirror_mail.png" /></a>'; + '&[email protected]">' . $name . ' <img src="/images/mirror_mail.png" /></a>'; } } @@ -638,7 +638,8 @@ echo <<<EOS <h1>Resources</h1> <a href="/manage/mirrors.php?mi={$moreinfo_flag}">{$moreinfo_text}</a><br /> <a href="http://php.net/mirroring.php" target="_blank">Guidelines</a><br /> - <a href="mailto:[email protected]">Mailing list</a><br /> + <a href="mailto:[email protected]">Announcement/Discussion List</a><br /> + <a href="mailto:[email protected]">Network Status List</a><br/> <a href="http://www.iana.org/domains/root/db/" target="_blank">Country TLDs</a> <h1>Last check time</h1> {$last_check_time} diff --git a/scripts/mirror-summary b/scripts/mirror-summary index 074f3b4..75563ea 100755 --- a/scripts/mirror-summary +++ b/scripts/mirror-summary @@ -130,10 +130,10 @@ if(DEBUG) { echo $body . "\n\n"; } else { mail( - "[email protected]", + "[email protected]", "[mirrors] Status information", $body, - "From: [email protected]" + "From: [email protected]" ); } @@ -163,7 +163,7 @@ foreach (array_merge($inactives, $disabled) as $hostname => $hostinfo) { $hostinfo[0], "$hostname mirror site deactivated", str_replace("{{lasterror}}", $last_error, $inactives_text), - "From: [email protected]" + "From: [email protected]" ); } } @@ -186,8 +186,7 @@ foreach ($outdated as $hostname => $hostinfo) { $hostinfo[0], "$hostname mirror site deactivated", $outdated_text, - "From: [email protected]" + "From: [email protected]" ); } } - diff --git a/scripts/mirror-test b/scripts/mirror-test index 87afeda..5e98d01 100755 --- a/scripts/mirror-test +++ b/scripts/mirror-test @@ -182,13 +182,13 @@ foreach ($hosts as $index => $host) { $lb_problem = "The following error occured when testing {$host['hostname']} for serving traffic for {$host['load_balanced']}.php.net:\n".$lb_problem; $query = "UPDATE mirrors SET load_balanced = '' WHERE hostname = '" . $host['hostname'] . "'"; $result = mysql_query($query) or die("unable to update the database: $query: " . mysql_error()); - // send a notification email to php-mirrors@ + // send a notification email to network-status@ mail( - "[email protected]", + "[email protected]", "[WARN] Round-robin for {$host['hostname']} is DOWN", $lb_problem, - "From: [email protected]", - "-f [email protected]" + "From: [email protected]", + "[email protected]" ); } } else { @@ -205,11 +205,11 @@ foreach ($hosts as $index => $host) { $sql = "UPDATE mirrors SET load_balanced='".mysql_real_escape_string($lb_ccname)."' WHERE hostname='".mysql_real_escape_string($host['hostname'])."'"; mysql_query($sql) or die('Error performing query: '.$sql.'.... MySQL said:'.PHP_EOL.mysql_error().PHP_EOL); mail( - '[email protected]', + '[email protected]', '[ OK ] Round-robin for '.$host['hostname'].' is UP', 'When most recently tested, '.$lb_ccname.'.php.net was cleared for reactivation.', - "From: [email protected]\r\nX-Mailer: PHP-".basename(__FILE__)."\r\n", - '[email protected]' + "From: [email protected]\r\nX-Mailer: PHP-".basename(__FILE__)."\r\n", + '[email protected]' ); } // We do nothing if the mirror is still an RR-only SNAFU. } // End of round-robin testing @@ -454,10 +454,10 @@ foreach ($hosts as $host) { // If less then 70 mirrors updated there is something severly wrong. mail it. if ($mirrorsupdated < 70) { @mail( - "[email protected]", + "[email protected],[email protected]", "[CRITICAL] Mirror site updates failure", "$mirrorsupdated mirror sites properly updated (out of " . count($hosts) . ")\n\nProblematic mirrors:\n\n" . $problems, - "From: [email protected]", - "-f [email protected]" + "From: [email protected]", + "[email protected]" ); } -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
