From de4b7e5b75d6c70720783e6987f7b2165f3f65bc Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 2 Jan 2008 20:26:06 +0000 Subject: [PATCH] * (bug 11428) Allow $wgScript inside $wgArticlePath when emulating PATH_INFO Fixes 'root'-style rewrite configurations --- RELEASE-NOTES | 2 ++ includes/WebRequest.php | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 0df4c52602..2f33b5a4ae 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -280,6 +280,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 12451) AJAX title normalization tweaks * When a user creating a page is not allowed to either create the page nor edit it, all applicable reasons are now shown. +* (bug 11428) Allow $wgScript inside $wgArticlePath when emulating PATH_INFO + Fixes 'root'-style rewrite configurations == Parser changes in 1.12 == diff --git a/includes/WebRequest.php b/includes/WebRequest.php index b549b9e66e..aafe13fc36 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -70,8 +70,19 @@ class WebRequest { if( $a ) { $path = $a['path']; + global $wgScript; + if( $path == $wgScript ) { + // Script inside a rewrite path? + // Abort to keep from breaking... + return; + } + // Raw PATH_INFO style + $matches = $this->extractTitle( $path, "$wgScript/$1" ); + global $wgArticlePath; - $matches = $this->extractTitle( $path, $wgArticlePath ); + if( !$matches && $wgActionPaths) { + $matches = $this->extractTitle( $path, $wgArticlePath ); + } global $wgActionPaths; if( !$matches && $wgActionPaths) { -- 2.20.1