From: Rob Church Date: Thu, 28 Jun 2007 16:06:32 +0000 (+0000) Subject: (bug 10398) Honour .php5 script extensions in pre-installation splash screen X-Git-Tag: 1.31.0-rc.0~52357 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_del%27%2C%20idvote=vote.voteid%29%20%7D%7D?a=commitdiff_plain;h=fe63674d1224b26b5b223f741d88f8be3a9c131a;p=lhc%2Fweb%2Fwiklou.git (bug 10398) Honour .php5 script extensions in pre-installation splash screen --- diff --git a/includes/templates/NoLocalSettings.php b/includes/templates/NoLocalSettings.php index e71dd396fa..9020c46e0c 100644 --- a/includes/templates/NoLocalSettings.php +++ b/includes/templates/NoLocalSettings.php @@ -7,9 +7,10 @@ if ( isset( $wgVersion ) ) { } # 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. +$ext = strpos( $_SERVER['SCRIPT_NAME'], 'index.php5' ) === false ? 'php' : 'php5'; $path = ''; if( isset( $_SERVER['SCRIPT_NAME'] )) { - $path = htmlspecialchars( preg_replace('/index.php/', '', $_SERVER['SCRIPT_NAME']) ); + $path = htmlspecialchars( preg_replace('/index.php5?/', '', $_SERVER['SCRIPT_NAME']) ); } ?> @@ -39,7 +40,7 @@ if( isset( $_SERVER['SCRIPT_NAME'] )) { 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." ); } ?>