From: Greg Sabino Mullane Date: Fri, 14 Jul 2006 20:40:16 +0000 (+0000) Subject: Ensure correct path is used in case we are trying to view a page in a subdirectory X-Git-Tag: 1.31.0-rc.0~56245 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=d7bb742862c8e5cfa5f3abc373fe39e590fe3db8;p=lhc%2Fweb%2Fwiklou.git Ensure correct path is used in case we are trying to view a page in a subdirectory --- diff --git a/includes/templates/NoLocalSettings.php b/includes/templates/NoLocalSettings.php index 7331d2d3dd..22ce534235 100644 --- a/includes/templates/NoLocalSettings.php +++ b/includes/templates/NoLocalSettings.php @@ -5,6 +5,12 @@ if ( isset( $wgVersion ) ) { } else { $wgVersion = 'VERSION'; } +# Set the path in case we hit a page such as /index.php/Main_Page +# Could use but then we have to worry about http[s]/port #/etc. +$path = ''; +if( isset( $_SERVER['SCRIPT_NAME'] )) { + $path = preg_replace('/index.php/', '', $_SERVER['SCRIPT_NAME']); +} ?> @@ -25,7 +31,7 @@ if ( isset( $wgVersion ) ) { - The MediaWiki logo + The MediaWiki logo

MediaWiki

@@ -33,7 +39,7 @@ if ( isset( $wgVersion ) ) { if ( file_exists( 'config/LocalSettings.php' ) ) { echo( 'To complete the installation, move config/LocalSettings.php to the parent directory.' ); } else { - echo( 'Please set up the wiki first.' ); + echo( "Please set up the wiki first." ); } ?>