r8010 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r8009‎ | r8010 | r8011 >
Date:12:11, 31 March 2005
Author:avar
Status:old
Tags:
Comment:
more stuff to fall back on
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DefaultSettings.php
@@ -31,8 +31,11 @@
3232 $wgServerName = $_SERVER['SERVER_NAME'];
3333 } elseif( isset( $_SERVER['HOSTNAME'] ) ) {
3434 $wgServerName = $_SERVER['HOSTNAME'];
 35+} elseif( isset( $_SERVER['HTTP_HOST'] ) ) {
 36+ $wgServerName = $_SERVER['HTTP_HOST'];
 37+} elseif( isset( $_SERVER['SERVER_ADDR'] ) ) {
 38+ $wgServerName = $_SERVER['SERVER_ADDR'];
3539 } else {
36 - # FIXME: Fall back on... something else?
3740 $wgServerName = 'localhost';
3841 }
3942

Follow-up revisions

RevisionCommit summaryAuthorDate
r89621When detecting $wgServer, do not fall back to $_SERVER['HTTP_HOST']. It's unl...tstarling03:31, 7 June 2011

Status & tagging log