From d7bb742862c8e5cfa5f3abc373fe39e590fe3db8 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Fri, 14 Jul 2006 20:40:16 +0000 Subject: [PATCH] Ensure correct path is used in case we are trying to view a page in a subdirectory --- includes/templates/NoLocalSettings.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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." ); } ?> -- 2.20.1