Index: trunk/phase3/includes/templates/NoLocalSettings.php |
— | — | @@ -7,32 +7,9 @@ |
8 | 8 | if ( !isset( $wgVersion ) ) { |
9 | 9 | $wgVersion = 'VERSION'; |
10 | 10 | } |
11 | | - |
12 | | -$scriptName = $_SERVER['SCRIPT_NAME']; |
13 | | -$ext = substr( $scriptName, strrpos( $scriptName, "." ) + 1 ); |
14 | | -$path = ''; |
15 | | -# Add any directories in the main folder that could contain an entrypoint (even possibly). |
16 | | -# We cannot just do a dir listing here, as we do not know where it is yet |
17 | | -# These must not also be the names of subfolders that may contain an entrypoint |
18 | | -$topdirs = array( 'extensions', 'includes' ); |
19 | | -foreach( $topdirs as $dir ){ |
20 | | - # Check whether a directory by this name is in the path |
21 | | - if( strrpos( $scriptName, "/" . $dir . "/" ) ){ |
22 | | - # If so, check whether it is the right folder |
23 | | - # First, get the number of directories up it is (to generate path) |
24 | | - $numToGoUp = substr_count( substr( $scriptName, strrpos( $scriptName, "/" . $dir . "/" ) + 1 ), "/" ); |
25 | | - # And generate the path using ..'s |
26 | | - for( $i = 0; $i < $numToGoUp; $i++ ){ |
27 | | - $realPath = "../" . $realPath; |
28 | | - } |
29 | | - # Checking existance (using the image here as it is something not likely to change, and to always be here) |
30 | | - if( file_exists( $realPath . "skins/common/images/mediawiki.png" ) ) { |
31 | | - # If so, get the path that we can use in this file, and stop looking |
32 | | - $path = substr( $scriptName, 0, strrpos( $scriptName, "/" . $dir . "/" ) + 1 ); |
33 | | - break; |
34 | | - } |
35 | | - } |
36 | | -} |
| 11 | +$script = $_SERVER['SCRIPT_NAME']; |
| 12 | +$path = pathinfo( $script, PATHINFO_DIRNAME ) . '/'; |
| 13 | +$ext = pathinfo( $script, PATHINFO_EXTENSION ); |
37 | 14 | ?> |
38 | 15 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
39 | 16 | <html xmlns='http://www.w3.org/1999/xhtml' lang='en'> |