* (bug 9466) "Rollback failed" page doesn't format edit comment
* (bug 9472) Invalid XHTML on cached special pages
* (bug 9472) Invalid XHTML on Special:Newpages
+* (bug 4764) "My contributions" not bold when viewing own contributions
== Maintenance ==
* New script maintenance/language/checkExtensioni18n.php used to check i18n
* @private
*/
function buildPersonalUrls() {
- global $wgTitle;
+ global $wgTitle, $wgRequest;
$fname = 'SkinTemplate::buildPersonalUrls';
$pageurl = $wgTitle->getLocalURL();
'href' => $href,
'active' => ( $href == $pageurl )
);
+
+ # We need to do an explicit check for Special:Contributions, as we
+ # have to match both the title, and the target (which could come
+ # from request values or be specified in "sub page" form. The plot
+ # thickens, because $wgTitle is altered for special pages, so doesn't
+ # contain the original alias-with-subpage.
+ $title = Title::newFromText( $wgRequest->getText( 'title' ) );
+ if( $title instanceof Title && $title->getNamespace() == NS_SPECIAL ) {
+ list( $spName, $spPar ) =
+ SpecialPage::resolveAliasWithSubpage( $title->getText() );
+ $active = $spName == 'Contributions'
+ && ( ( $spPar && $spPar == $this->username )
+ || $wgRequest->getText( 'target' ) == $this->username );
+ } else {
+ $active = false;
+ }
+
$href = self::makeSpecialUrlSubpage( 'Contributions', $this->username );
$personal_urls['mycontris'] = array(
'text' => wfMsg( 'mycontris' ),
'href' => $href,
- // FIXME # 'active' was disabled in r11346 with message: "disable bold link to my contributions; link was bold on all
- // Special:Contributions, not just current user's (fix me please!)". Until resolved (bug 4764), explicitly setting active to false.
- 'active' => false # ( ( $href == $pageurl . '/' . $this->username )
+ 'active' => $active
);
$personal_urls['logout'] = array(
'text' => wfMsg( 'userlogout' ),