Index: trunk/phase3/skins/Vector.php |
— | — | @@ -63,7 +63,7 @@ |
64 | 64 | 'actions' => array(), |
65 | 65 | 'variants' => array() |
66 | 66 | ); |
67 | | - |
| 67 | + |
68 | 68 | // Detects parameters |
69 | 69 | $action = $wgRequest->getVal( 'action', 'view' ); |
70 | 70 | $section = $wgRequest->getVal( 'section' ); |
— | — | @@ -79,11 +79,16 @@ |
80 | 80 | $isTalk = $this->mTitle->isTalkPage(); |
81 | 81 | |
82 | 82 | // Generates XML IDs from namespace names |
83 | | - $subjectId = $wgContLang->lc( $this->mTitle->getSubjectNsText() ); |
| 83 | + $subjectId = $wgContLang->lc($wgCanonicalNamespaceNames[MWNamespace::getSubject($this->mTitle->getNamespace())]); |
| 84 | + |
84 | 85 | if ( $subjectId == '' ) { |
85 | 86 | $subjectId = 'main'; |
86 | 87 | } |
87 | | - $talkId = "{$subjectId}_talk"; |
| 88 | + if ( $subjectId == 'main' ) { |
| 89 | + $talkId = 'talk'; |
| 90 | + } else { |
| 91 | + $talkId = "{$subjectId}_talk"; |
| 92 | + } |
88 | 93 | $currentId = $isTalk ? $talkId : $subjectId; |
89 | 94 | |
90 | 95 | // Adds namespace links |
— | — | @@ -93,7 +98,7 @@ |
94 | 99 | $links['namespaces'][$talkId] = $this->tabAction( |
95 | 100 | $talkPage, 'vector-namespace-talk', $isTalk, '', true |
96 | 101 | ); |
97 | | - |
| 102 | + |
98 | 103 | // Adds view view link |
99 | 104 | if ( $this->mTitle->exists() ) { |
100 | 105 | $links['views']['view'] = $this->tabAction( |
— | — | @@ -103,7 +108,7 @@ |
104 | 109 | } |
105 | 110 | |
106 | 111 | wfProfileIn( __METHOD__ . '-edit' ); |
107 | | - |
| 112 | + |
108 | 113 | // Checks if user can... |
109 | 114 | if ( |
110 | 115 | // edit the current page |
— | — | @@ -396,7 +401,7 @@ |
397 | 402 | $this->data['view_urls'] = $nav['views']; |
398 | 403 | $this->data['action_urls'] = $nav['actions']; |
399 | 404 | $this->data['variant_urls'] = $nav['variants']; |
400 | | - |
| 405 | + |
401 | 406 | // Build additional attributes for personal_urls |
402 | 407 | foreach ( $this->data['personal_urls'] as $key => $item) { |
403 | 408 | $this->data['personal_urls'][$key]['attributes'] = |
Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -1254,6 +1254,10 @@ |
1255 | 1255 | [See http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/examples/Content_action.php |
1256 | 1256 | for an example] |
1257 | 1257 | |
| 1258 | +'SkinTemplateNavigation': Alter the structured navigation links in SkinTemplates |
| 1259 | +&$links: Structured navigation links |
| 1260 | +This is used to alter the navigation for skins which use buildNavigationUrls such as Vector. |
| 1261 | + |
1258 | 1262 | 'SkinTemplateOutputPageBeforeExec': Before SkinTemplate::outputPage() |
1259 | 1263 | starts page output |
1260 | 1264 | &$sktemplate: SkinTemplate object |
— | — | @@ -1530,7 +1534,7 @@ |
1531 | 1535 | |
1532 | 1536 | 'UserLoginMailPassword': Block users from emailing passwords |
1533 | 1537 | $name: the username to email the password of. |
1534 | | -&$error: out-param ��the error message to return. |
| 1538 | +&$error: out-param ��the error message to return. |
1535 | 1539 | |
1536 | 1540 | 'UserLogout': before a user logs out |
1537 | 1541 | $user: the user object that is about to be logged out |