Commit:    b884972dffe413f1ebefaf7be9f0026432b28e7d
Author:    Hannes Magnusson <[email protected]>         Thu, 11 Oct 2012 08:39:50 
+0200
Parents:   43460dd6b1c2be97c7a971daf0e49860d750845a
Branches:  master

Link:       
http://git.php.net/?p=web/php.git;a=commitdiff;h=b884972dffe413f1ebefaf7be9f0026432b28e7d

Log:
The CC.php.net has been removed for this array.

Look up the IP in the array (allthough this could give lot of false positives 
and incorrect sponsoring credits!!)
And if it exists, proceed with the current hostname

This should fix the weird base name the manual pages are getting

Changed paths:
  M  include/site.inc


Diff:
diff --git a/include/site.inc b/include/site.inc
index 543d0c5..2f44d4e 100644
--- a/include/site.inc
+++ b/include/site.inc
@@ -433,12 +433,14 @@ if($_SERVER["SERVER_PORT"] != '80') {
     $MYSITE = 'http://' . $_SERVER["SERVER_NAME"] . '/'; 
 }
 
-// If this site does not exist
+// If this site does not exist - it is most likely because
+// CC.php.net isn't in this array anymore.
 if (!isset($MIRRORS[$MYSITE])) {
 
     // Check if the IP address exists (a fix for the round-robin introduction)
     if (isset($MIRRORS[$_SERVER['SERVER_ADDR']])) {
-        $MYSITE = $_SERVER['SERVER_ADDR'];
+       // Since it does, we know the servername is fine
+       $MYSITE = 'http://' . $_SERVER["SERVER_NAME"] . '/';
     } else {
 
         // Try the hostname [without www]. In case the main name above is


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to