Fixed bugs in the data structure of the result of buildNavigationUrls including internationalized messages as keys (#19304), lack of documentation for the SkinTemplateNavigation hook (#19522) and an issue with an XML ID being ca-main_talk rather than ca-talk mentioned in #19471
This commit is contained in:
parent
2cae0f1d65
commit
0d0a41ddcf
2 changed files with 16 additions and 7 deletions
|
|
@ -1254,6 +1254,10 @@ $nav_urls: array of tabs
|
|||
[See http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/examples/Content_action.php
|
||||
for an example]
|
||||
|
||||
'SkinTemplateNavigation': Alter the structured navigation links in SkinTemplates
|
||||
&$links: Structured navigation links
|
||||
This is used to alter the navigation for skins which use buildNavigationUrls such as Vector.
|
||||
|
||||
'SkinTemplateOutputPageBeforeExec': Before SkinTemplate::outputPage()
|
||||
starts page output
|
||||
&$sktemplate: SkinTemplate object
|
||||
|
|
@ -1530,7 +1534,7 @@ $template: SimpleTemplate instance for the form
|
|||
|
||||
'UserLoginMailPassword': Block users from emailing passwords
|
||||
$name: the username to email the password of.
|
||||
&$error: out-param ÐÊthe error message to return.
|
||||
&$error: out-param <EFBFBD><EFBFBD>the error message to return.
|
||||
|
||||
'UserLogout': before a user logs out
|
||||
$user: the user object that is about to be logged out
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class SkinVector extends SkinTemplate {
|
|||
'actions' => array(),
|
||||
'variants' => array()
|
||||
);
|
||||
|
||||
|
||||
// Detects parameters
|
||||
$action = $wgRequest->getVal( 'action', 'view' );
|
||||
$section = $wgRequest->getVal( 'section' );
|
||||
|
|
@ -79,11 +79,16 @@ class SkinVector extends SkinTemplate {
|
|||
$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
|
||||
|
|
@ -93,7 +98,7 @@ class SkinVector extends SkinTemplate {
|
|||
$links['namespaces'][$talkId] = $this->tabAction(
|
||||
$talkPage, 'vector-namespace-talk', $isTalk, '', true
|
||||
);
|
||||
|
||||
|
||||
// Adds view view link
|
||||
if ( $this->mTitle->exists() ) {
|
||||
$links['views']['view'] = $this->tabAction(
|
||||
|
|
@ -103,7 +108,7 @@ class SkinVector extends SkinTemplate {
|
|||
}
|
||||
|
||||
wfProfileIn( __METHOD__ . '-edit' );
|
||||
|
||||
|
||||
// Checks if user can...
|
||||
if (
|
||||
// edit the current page
|
||||
|
|
@ -396,7 +401,7 @@ class VectorTemplate extends QuickTemplate {
|
|||
$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'] =
|
||||
|
|
|
|||
Loading…
Reference in a new issue