Index: trunk/phase3/includes/WebRequest.php |
— | — | @@ -47,10 +47,15 @@ |
48 | 48 | function WebRequest() { |
49 | 49 | $this->checkMagicQuotes(); |
50 | 50 | global $wgUsePathInfo; |
51 | | - if( isset( $_SERVER['PATH_INFO'] ) && ($_SERVER['PATH_INFO'] != '') && $wgUsePathInfo ) { |
52 | | - # Stuff it! |
53 | | - $_GET['title'] = $_REQUEST['title'] = |
54 | | - substr( $_SERVER['PATH_INFO'], 1 ); |
| 51 | + if ( $wgUsePathInfo ) { |
| 52 | + if ( isset( $_SERVER['ORIG_PATH_INFO'] ) && $_SERVER['ORIG_PATH_INFO'] != '' ) { |
| 53 | + # Mangled PATH_INFO |
| 54 | + # http://bugs.php.net/bug.php?id=31892 |
| 55 | + # Also reported when ini_get('cgi.fix_pathinfo')==false |
| 56 | + $_GET['title'] = $_REQUEST['title'] = substr( $_SERVER['ORIG_PATH_INFO'], 1 ); |
| 57 | + } elseif ( isset( $_SERVER['PATH_INFO'] ) && ($_SERVER['PATH_INFO'] != '') && $wgUsePathInfo ) { |
| 58 | + $_GET['title'] = $_REQUEST['title'] = substr( $_SERVER['PATH_INFO'], 1 ); |
| 59 | + } |
55 | 60 | } |
56 | 61 | } |
57 | 62 | |