r64937 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64936‎ | r64937 | r64938 >
Date:15:38, 11 April 2010
Author:btongminh
Status:resolved (Comments)
Tags:
Comment:
$_SERVER['REQUEST_URI'] is not available using IIS with rewrite rules, so use HTTP_X_ORIGINAL_URL as alternative.
Modified paths:
  • /trunk/phase3/includes/Setup.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Setup.php
@@ -182,7 +182,12 @@
183183 wfDebug( "\n\nStart command line script $self\n" );
184184 } else {
185185 wfDebug( "Start request\n\n" );
186 - wfDebug( $_SERVER['REQUEST_METHOD'] . ' ' . $_SERVER['REQUEST_URI'] . "\n" );
 186+ # Output the REQUEST_URI. This is not supported by IIS in rewrite mode,
 187+ # so use an alternative
 188+ $requestUri = isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] :
 189+ ( isset( $_SERVER['HTTP_X_ORIGINAL_URL'] ) ? $_SERVER['HTTP_X_ORIGINAL_URL'] :
 190+ $_SERVER['PHP_SELF'] );
 191+ wfDebug( "{$_SERVER['REQUEST_METHOD']} {$requestUri}\n" );
187192
188193 if ( $wgDebugPrintHttpHeaders ) {
189194 $headerOut = "HTTP HEADERS:\n";

Follow-up revisions

RevisionCommit summaryAuthorDate
r78115Follow-up to r64937: expand ternary to conditionals because I hate nested ter...werdna03:12, 9 December 2010

Comments

#Comment by Werdna (talk | contribs)   03:13, 9 December 2010

I've expanded out the ternary in r78115 because I hate ternaries.

Status & tagging log