Index: trunk/phase3/includes/templates/NoLocalSettings.php |
— | — | @@ -9,11 +9,18 @@ |
10 | 10 | if ( !isset( $wgVersion ) ) { |
11 | 11 | $wgVersion = 'VERSION'; |
12 | 12 | } |
13 | | -$script = $_SERVER['SCRIPT_NAME']; |
14 | | -$path = pathinfo( $script, PATHINFO_DIRNAME ) . '/'; |
15 | | -$path = str_replace( '//', '/', $path ); |
16 | | -$ext = pathinfo( $script, PATHINFO_EXTENSION ); |
17 | 13 | |
| 14 | +$matches = array(); |
| 15 | +$ext = 'php'; |
| 16 | +$path = '/'; |
| 17 | +foreach( array_filter( explode( '/', $_SERVER['PHP_SELF'] ) ) as $part ) { |
| 18 | + if( !preg_match( '/\.(php5?)$/', $part, $matches ) ) { |
| 19 | + $path .= "$part/"; |
| 20 | + } else { |
| 21 | + $ext = $matches[1] == 'php5' ? 'php5' : 'php'; |
| 22 | + } |
| 23 | +} |
| 24 | + |
18 | 25 | # Check to see if the installer is running |
19 | 26 | if ( !function_exists( 'session_name' ) ) { |
20 | 27 | $installerStarted = false; |