(bug 15544) non-index.php entry points prior to setup produced a bad /config/index...
authorChad Horohoe <demon@users.mediawiki.org>
Thu, 11 Sep 2008 00:07:32 +0000 (00:07 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Thu, 11 Sep 2008 00:07:32 +0000 (00:07 +0000)
CREDITS
RELEASE-NOTES
includes/templates/NoLocalSettings.php

diff --git a/CREDITS b/CREDITS
index 14c086b..f12d338 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -42,12 +42,13 @@ following names for their contribution to the product.
 * Daniel Arnold
 * Danny B.
 * Jeremy Baron
+* Juliano F. Ravasi
 * Louperivois
+* Matt Johnston
 * Max Semenik
 * Michael De La Rue
 * Mike Horvath
 * Mormegil
-* Juliano F. Ravasi
 * RememberTheDot
 * ST47
 
index f6c0c35..5ed6c8c 100644 (file)
@@ -189,6 +189,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 14398) mwsuggest.js: Let width of container be configurable
 * (bug 15543) Only include user touched timestamp to generated CSS
 * (bug 15497) Removed encoding attribute from <?xml ?> tag
+* (bug 15544) Wiki not set up message (NoLocalSettings.php) now works for 
+  non-index.php entry pages (e.g. api.php). Patch by Matt Johnston.
 
 
 === API changes in 1.14 ===
index 75a7e95..fde9706 100644 (file)
@@ -17,6 +17,10 @@ $path = '';
 if( isset( $_SERVER['SCRIPT_NAME'] )) {
        $path = htmlspecialchars( preg_replace('/index.php5?/', '', $_SERVER['SCRIPT_NAME']) );
 }
+#Remove filename in path, prevents going to corrupt URLs (e.g. http://server/path/api.phpconfig/index.php)
+if(substr($path, strlen($path)-1) != "/"){
+       $path = substr($path, 0, strrpos($path, "/")+1);
+}
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>