Index: trunk/phase3/maintenance/parserTests.txt |
— | — | @@ -3167,6 +3167,16 @@ |
3168 | 3168 | !! end |
3169 | 3169 | |
3170 | 3170 | !! test |
| 3171 | +{{#special:}} page name with subpage, known |
| 3172 | +!! options |
| 3173 | +msg |
| 3174 | +!! input |
| 3175 | +{{#special:Recentchanges/param}} |
| 3176 | +!! result |
| 3177 | +Special:RecentChanges/param |
| 3178 | +!! end |
| 3179 | + |
| 3180 | +!! test |
3171 | 3181 | {{#special:}} page name, unknown |
3172 | 3182 | !! options |
3173 | 3183 | msg |
Index: trunk/phase3/includes/parser/CoreParserFunctions.php |
— | — | @@ -561,9 +561,10 @@ |
562 | 562 | } |
563 | 563 | |
564 | 564 | static function special( $parser, $text ) { |
565 | | - $title = SpecialPage::getTitleForAlias( $text ); |
566 | | - if ( $title ) { |
567 | | - return $title->getPrefixedText(); |
| 565 | + list( $page, $subpage ) = SpecialPage::resolveAliasWithSubpage( $text ); |
| 566 | + if ( $page ) { |
| 567 | + $title = SpecialPage::getTitleFor( $page, $subpage ); |
| 568 | + return $title; |
568 | 569 | } else { |
569 | 570 | return wfMsgForContent( 'nosuchspecialpage' ); |
570 | 571 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -49,6 +49,7 @@ |
50 | 50 | * (bug 22353) Categorised recent changes now works again |
51 | 51 | * (bug 22747) "Reveal my e-mail address in notification e-mails" preference is |
52 | 52 | now only displayed when relevant |
| 53 | +* (bug 22772) {{#special:}} parser function now works with subpages |
53 | 54 | |
54 | 55 | == API changes in 1.17 == |
55 | 56 | * (bug 22738) Allow filtering by action type on query=logevent |