Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -2611,11 +2611,16 @@ |
2612 | 2612 | $title = $this->getTitle(); |
2613 | 2613 | $ns = $title->getNamespace(); |
2614 | 2614 | $nsname = MWNamespace::exists( $ns ) ? MWNamespace::getCanonicalName( $ns ) : $title->getNsText(); |
| 2615 | + if ( $ns == NS_SPECIAL ) { |
| 2616 | + $parts = SpecialPage::resolveAliasWithSubpage( $title->getDBkey() ); |
| 2617 | + $canonicalName = $parts[0]; |
| 2618 | + } else { |
| 2619 | + $canonicalName = false; # bug 21115 |
| 2620 | + } |
2615 | 2621 | |
2616 | 2622 | $vars = array( |
2617 | 2623 | 'wgCanonicalNamespace' => $nsname, |
2618 | | - 'wgCanonicalSpecialPageName' => $ns == NS_SPECIAL ? |
2619 | | - SpecialPage::resolveAlias( $title->getDBkey() ) : false, # bug 21115 |
| 2624 | + 'wgCanonicalSpecialPageName' => $canonicalName, |
2620 | 2625 | 'wgNamespaceNumber' => $title->getNamespace(), |
2621 | 2626 | 'wgPageName' => $title->getPrefixedDBKey(), |
2622 | 2627 | 'wgTitle' => $title->getText(), |