* (bug 22772) {{#special:}} parser function now works with subpages
This commit is contained in:
parent
2e30b0592a
commit
70969c83ce
3 changed files with 15 additions and 3 deletions
|
|
@ -49,6 +49,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
|
|||
* (bug 22353) Categorised recent changes now works again
|
||||
* (bug 22747) "Reveal my e-mail address in notification e-mails" preference is
|
||||
now only displayed when relevant
|
||||
* (bug 22772) {{#special:}} parser function now works with subpages
|
||||
|
||||
== API changes in 1.17 ==
|
||||
* (bug 22738) Allow filtering by action type on query=logevent
|
||||
|
|
|
|||
|
|
@ -561,9 +561,10 @@ class CoreParserFunctions {
|
|||
}
|
||||
|
||||
static function special( $parser, $text ) {
|
||||
$title = SpecialPage::getTitleForAlias( $text );
|
||||
if ( $title ) {
|
||||
return $title->getPrefixedText();
|
||||
list( $page, $subpage ) = SpecialPage::resolveAliasWithSubpage( $text );
|
||||
if ( $page ) {
|
||||
$title = SpecialPage::getTitleFor( $page, $subpage );
|
||||
return $title;
|
||||
} else {
|
||||
return wfMsgForContent( 'nosuchspecialpage' );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3166,6 +3166,16 @@ msg
|
|||
Special:RecentChanges
|
||||
!! end
|
||||
|
||||
!! test
|
||||
{{#special:}} page name with subpage, known
|
||||
!! options
|
||||
msg
|
||||
!! input
|
||||
{{#special:Recentchanges/param}}
|
||||
!! result
|
||||
Special:RecentChanges/param
|
||||
!! end
|
||||
|
||||
!! test
|
||||
{{#special:}} page name, unknown
|
||||
!! options
|
||||
|
|
|
|||
Loading…
Reference in a new issue