com web/php: use is_primary_site() for checking i f we are running on the primary mirror: git-p hp.php mod.php
| From: | Ferenc Kovacs | Date: | Thu, 10 Jul 2014 16:26:07 +0000 |
| Subject: | com web/php: use is_primary_site() for checking i f we are running on the primary mirror: git-p hp.php mod.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-19431@lists.php.net to get a copy of this message | ||
Commit: 6cdd6d47b098d525206c59d1d1d1954c391eadf3
Author: kovacs.ferenc <kovacs.ferenc@ustream.tv> Thu, 10 Jul 2014 18:25:43 +0200
Parents: 97c0eaf65905859aa6b2751e0656d49c77d70db9
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=6cdd6d47b098d525206c59d1d1d1954c391eadf3
Log:
use is_primary_site() for checking if we are running on the primary mirror
Changed paths:
M git-php.php
M mod.php
Diff:
diff --git a/git-php.php b/git-php.php
index 9a73afa..1bc187a 100644
--- a/git-php.php
+++ b/git-php.php
@@ -4,9 +4,9 @@ include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/email-validation.inc';
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/posttohost..inc';
-// Force the account requests to www.php.net
-if ($MYSITE != "http://www.php.net/" &&
$MYSITE != 'http://php.net/') {
- header('Location: http://www.php.net/'.$_SERVER['BASE_PAGE']);
+// Force the account requests to php.net
+if (!is_primary_site()) {
+ header('Location: http://php.net/'.$_SERVER['BASE_PAGE']);
exit;
}
diff --git a/mod.php b/mod.php
index 32fab15..024d73f 100644
--- a/mod.php
+++ b/mod.php
@@ -13,7 +13,7 @@ include_once $_SERVER['DOCUMENT_ROOT'] .
'/include/prepend.inc';
site_header("Email confirmation", array("current" =>
"community"));
// Only run on main php.net box.
-if ($MYSITE != "http://www.php.net/" &&
$MYSITE != 'http://php.net/') {
+if (!is_primary_site()) {
echo <<<ERROR
<h1>Email confirmation failed</h1>