mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 06:24:08 +00:00
Fix special page override
Bug: T204873 Change-Id: I463cbbbc5b6f284aa2794ceb2652911ef7053c2e
This commit is contained in:
parent
6944faff25
commit
327f600ca1
|
@ -164,16 +164,19 @@ class SpecialCollabPad extends SpecialPage {
|
|||
* @return bool Always true.
|
||||
*/
|
||||
public static function onSkinTemplateNavigationSpecialPage( SkinTemplate &$skin, array &$links ) {
|
||||
$subPage = self::getSubPage( $skin->getTitle() );
|
||||
$links['namespaces']['special']['text'] = $skin->msg( 'collabpad' )->text();
|
||||
if ( $subPage ) {
|
||||
$links['namespaces']['special']['href'] =
|
||||
Title::newFromText( 'Special:CollabPad' )->getLocalURL();
|
||||
$links['namespaces']['special']['class'] = '';
|
||||
$title = $skin->getTitle();
|
||||
if ( $title && $title->isSpecial( 'CollabPad' ) ) {
|
||||
$subPage = self::getSubPage( $title );
|
||||
$links['namespaces']['special']['text'] = $skin->msg( 'collabpad' )->text();
|
||||
if ( $subPage ) {
|
||||
$links['namespaces']['special']['href'] =
|
||||
Title::newFromText( 'Special:CollabPad' )->getLocalURL();
|
||||
$links['namespaces']['special']['class'] = '';
|
||||
|
||||
$links['namespaces']['pad']['text'] = $subPage->getPrefixedText();
|
||||
$links['namespaces']['pad']['href'] = '';
|
||||
$links['namespaces']['pad']['class'] = 'selected';
|
||||
$links['namespaces']['pad']['text'] = $subPage->getPrefixedText();
|
||||
$links['namespaces']['pad']['href'] = '';
|
||||
$links['namespaces']['pad']['class'] = 'selected';
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue