From: Chad Horohoe Date: Fri, 2 Jan 2009 16:34:43 +0000 (+0000) Subject: (bug 16850) Allow $wgActionPaths to contain query strings. X-Git-Tag: 1.31.0-rc.0~43619 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=f2c51880eae5fc0ee9eb3436517b694814a56fa8;p=lhc%2Fweb%2Fwiklou.git (bug 16850) Allow $wgActionPaths to contain query strings. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 77d3a8ac00..b5ceb1d162 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -462,6 +462,8 @@ The following extensions are migrated into MediaWiki 1.14: file extension (e.g. Foo. jpg). * Image moving over an existing file no longer throws a database error * (bug 16786) Restored "redundant" links recently removed from Classic sidebar +* (bug 16850) $wgActionPaths can have query strings now, previously, this broke + local URLs === API changes in 1.14 === diff --git a/includes/Title.php b/includes/Title.php index 45625a059b..035314a60d 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -760,7 +760,10 @@ class Title { $query = $matches[1]; if( isset( $matches[4] ) ) $query .= $matches[4]; $url = str_replace( '$1', $dbkey, $wgActionPaths[$action] ); - if( $query != '' ) $url .= '?' . $query; + if( $query != '' ) { + $url .= ( strpos( $wgActionPaths[$action], '?' ) + === false ? '?' : '&' ) . $query; + } } } if ( $url === false ) {