Index: trunk/phase3/includes/RawPage.php |
— | — | @@ -111,7 +111,7 @@ |
112 | 112 | function view() { |
113 | 113 | global $wgOut, $wgScript; |
114 | 114 | |
115 | | - if( isset( $_SERVER['SCRIPT_URL'] ) ) { |
| 115 | + if( isset( $_SERVER['SCRIPT_NAME'] ) ) { |
116 | 116 | # Normally we use PHP_SELF to get the URL to the script |
117 | 117 | # as it was called, minus the query string. |
118 | 118 | # |
— | — | @@ -122,16 +122,16 @@ |
123 | 123 | # |
124 | 124 | # If in this mode, use SCRIPT_URL instead, which mod_rewrite |
125 | 125 | # provides containing the "before" URL. |
126 | | - $url = $_SERVER['SCRIPT_URL']; |
| 126 | + $url = $_SERVER['SCRIPT_NAME']; |
127 | 127 | } else { |
128 | | - $url = $_SERVER['PHP_SELF']; |
| 128 | + $url = $_SERVER['URL']; |
129 | 129 | } |
130 | 130 | |
131 | 131 | if( $url == '' ) { |
132 | 132 | # This will make the next check fail with a confusing error |
133 | 133 | # message, so we should mention it separately. |
134 | 134 | wfHttpError( 500, 'Internal Server Error', |
135 | | - "\$_SERVER['PHP_SELF'] is not set. Perhaps you're using CGI" . |
| 135 | + "\$_SERVER['URL'] is not set. Perhaps you're using CGI" . |
136 | 136 | " and haven't set cgi.fix_pathinfo = 1 in php.ini?" ); |
137 | 137 | return; |
138 | 138 | } |