contribs talk link; RFE 845599
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 20 Nov 2003 06:57:00 +0000 (06:57 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 20 Nov 2003 06:57:00 +0000 (06:57 +0000)
includes/SpecialContributions.php
includes/Title.php

index 6719274..b538cf9 100644 (file)
@@ -24,10 +24,16 @@ function wfSpecialContributions( $par = "" )
        $sk = $wgUser->getSkin();
        $id = User::idFromName( $nt->getText() );
 
-       if ( 0 == $id ) { $ul = $nt->getText(); }
-       else {
+       if ( 0 == $id ) {
+               $ul = $nt->getText();
+       } else {
                $ul = $sk->makeKnownLink( $nt->getPrefixedText(), $nt->getText() );
        }
+       $talk = $nt->getTalkPage();
+       if( $talk )
+               $ul .= " (" . $sk->makeLinkObj( $talk, $wgLang->getNsText(Namespace::getTalk(0)) ) . ")";
+       else
+               $ul .= "brrrp";
        $wgOut->setSubtitle( wfMsg( "contribsub", $ul ) );
 
        if ( ! isset( $hideminor ) ) {
index 2480679..7396b6b 100644 (file)
@@ -453,5 +453,13 @@ class Title {
                wfProfileOut( $fname );
                return true;
        }
+       
+       function getTalkPage() {
+               return Title::makeTitle( Namespace::getTalk( $this->getNamespace() ), $this->getDBkey() );
+       }
+       
+       function getSubjectPage() {
+               return Title::makeTitle( Namespace::getSubject( $this->getNamespace() ), $this->getDBkey() );
+       }
 }
 ?>