com web/php: Attempt to fix the php.net cross-domain issues once and for all.: include/site.inc
| From: | Paul Dragoonis | Date: | Thu, 03 Jul 2014 01:17:31 +0000 |
| Subject: | com web/php: Attempt to fix the php.net cross-domain issues once and for all.: include/site.inc | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-21971@lists.php.net to get a copy of this message | ||
Commit: c49f4a989d9d4f8f8b430dddeab31a8d5e1fdf83
Author: Adam Harvey <aharvey@php.net> Wed, 2 Jul 2014 18:17:31 -0700
Parents: 117fa32eafd4c47ec80cd64ee6d6732b711200f2
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=c49f4a989d9d4f8f8b430dddeab31a8d5e1fdf83
Log:
Attempt to fix the php.net cross-domain issues once and for all.
(But this is a terrible hac...)
ONCE AND FOR ALL.
Changed paths:
M include/site.inc
Diff:
diff --git a/include/site.inc b/include/site.inc
index 508fd62..affa89d 100644
--- a/include/site.inc
+++ b/include/site.inc
@@ -515,6 +515,10 @@ if($_SERVER["SERVER_PORT"] != '80' &&
$_SERVER["SERVER_PORT"] != 443) {
$msite = 'http://' .
$_SERVER["SERVER_NAME"] . '/';
}
+// This is a horrendous hack that should be removed at some point, but we need
+// to avoid cross-domain issues where php.net is configured as www.php.net.
+$MIRRORS['http://php.net/'] = $MIRRORS['http://www.php.net/'];
+
// If this site does not exist - it is most likely because
// CC.php.net isn't in this array anymore.
if (!isset($MIRRORS[$MYSITE])) {