r5336 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r5335‎ | r5336 | r5337 >
Date:21:53, 20 September 2004
Author:wmahan
Status:old
Tags:
Comment:
Bug 506: use $_SERVER[] instead of getenv() because the latter doesn't work
on IIS in ISAPI mode.
Modified paths:
  • /trunk/phase3/LocalSettings.sample (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/Setup.php (modified) (history)

Diff [purge]

Index: trunk/phase3/LocalSettings.sample
@@ -74,8 +74,8 @@
7575
7676 ## Preferably these addresses should be able to receive mail asking for help
7777 #
78 -$wgEmergencyContact = "wikiadmin@" . getenv( "SERVER_NAME" );
79 -$wgPasswordSender = "Wikipedia Mail <apache@" . getenv( "SERVER_NAME" ) . ">";
 78+$wgEmergencyContact = "wikiadmin@" . $_SERVER['SERVER_NAME'];
 79+$wgPasswordSender = "Wikipedia Mail <apache@" . $_SERVER['SERVER_NAME'] . ">";
8080
8181 # MySQL settings
8282 #
Index: trunk/phase3/includes/DefaultSettings.php
@@ -117,14 +117,15 @@
118118 * Default to wikiadmin@SERVER_NAME
119119 * @global string $wgEmergencyContact
120120 */
121 -$wgEmergencyContact = 'wikiadmin@' . getenv( 'SERVER_NAME' );
 121+$wgEmergencyContact = 'wikiadmin@' . $_SERVER['SERVER_NAME'];
 122+
122123 /**
123124 * Password reminder email address
124125 * The address we should use as sender when a user is requesting his password
125126 * Default to apache@SERVER_NAME
126127 * @global string $wgPasswordSender
127128 */
128 -$wgPasswordSender = 'Wikipedia Mail <apache@' . getenv( 'SERVER_NAME' ) . '>';
 129+$wgPasswordSender = 'Wikipedia Mail <apache@' . $_SERVER['SERVER_NAME'] . '>';
129130
130131
131132 /**
Index: trunk/phase3/includes/Setup.php
@@ -41,7 +41,7 @@
4242 }
4343 $wgIP = trim(end($hopips));
4444 } else {
45 - $wgIP = getenv('REMOTE_ADDR');
 45+ $wgIP = $_SERVER['REMOTE_ADDR'];
4646 }
4747
4848

Follow-up revisions

RevisionCommit summaryAuthorDate
r5960Bug 506: use $_SERVER[] instead of getenv() because the latter...wmahan04:23, 18 October 2004

Status & tagging log