'actions' => array(),
'variants' => array()
);
-
+
// Detects parameters
$action = $wgRequest->getVal( 'action', 'view' );
$section = $wgRequest->getVal( 'section' );
$isTalk = $this->mTitle->isTalkPage();
// Generates XML IDs from namespace names
- $subjectId = $wgContLang->lc( $this->mTitle->getSubjectNsText() );
+ $subjectId = $wgContLang->lc($wgCanonicalNamespaceNames[MWNamespace::getSubject($this->mTitle->getNamespace())]);
+
if ( $subjectId == '' ) {
$subjectId = 'main';
}
- $talkId = "{$subjectId}_talk";
+ if ( $subjectId == 'main' ) {
+ $talkId = 'talk';
+ } else {
+ $talkId = "{$subjectId}_talk";
+ }
$currentId = $isTalk ? $talkId : $subjectId;
-
+
// Adds namespace links
$links['namespaces'][$subjectId] = $this->tabAction(
$subjectPage, 'vector-namespace-' . $subjectId, !$isTalk, '', true
$links['namespaces'][$talkId] = $this->tabAction(
$talkPage, 'vector-namespace-talk', $isTalk, '', true
);
-
+
// Adds view view link
if ( $this->mTitle->exists() ) {
$links['views']['view'] = $this->tabAction(
}
wfProfileIn( __METHOD__ . '-edit' );
-
+
// Checks if user can...
if (
// edit the current page
);
}
}
-
+
+ // This is instead of SkinTemplateTabs - which uses a flat array
+ wfRunHooks( 'SkinTemplateNavigation', array( &$this, &$links ) );
+
// If it's not content, it's got to be a special page
} else {
$links['namespaces']['special'] = array(
$this->data['view_urls'] = $nav['views'];
$this->data['action_urls'] = $nav['actions'];
$this->data['variant_urls'] = $nav['variants'];
-
+
// Build additional attributes for personal_urls
foreach ( $this->data['personal_urls'] as $key => $item) {
$this->data['personal_urls'][$key]['attributes'] =
<!-- variants -->
<?php if ( count( $this->data['variant_urls'] ) > 0 ): ?>
<div id="variants">
- <h5><div class="icon"><span><?php $this->msg('variants') ?></span></div></h5>
+ <h5><span><?php $this->msg('variants') ?></span><a href="#"> </a></h5>
<div class="menu">
<ul <?php $this->html('userlangattributes') ?>>
<?php foreach ($this->data['variant_urls'] as $key => $link ): ?>