Re-revert of r25349 per Brion on
authorRaimond Spekking <raymond@users.mediawiki.org>
Mon, 3 Sep 2007 18:21:53 +0000 (18:21 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Mon, 3 Sep 2007 18:21:53 +0000 (18:21 +0000)
http://lists.wikimedia.org/pipermail/wikitech-l/2007-September/033207.html

RELEASE-NOTES
includes/WatchlistEditor.php

index 8cfa4a0..1862b1d 100644 (file)
@@ -194,6 +194,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   text for a non-existent page
 * (bug 11022) Use a more accurate page title for Special:Whatlinkshere and
   Special:Recentchangeslinked
+* Add link to user contributions in normal watchlist edit mode
 * (bug 9426) Add 'newsectionheaderdefaultlevel' message to allow 
   modification of the heading formatting for new sections when section=new 
   argument is supplied
index cdc9f0e..e03225a 100644 (file)
@@ -411,8 +411,12 @@ class WatchlistEditor {
                if( $redirect )
                        $link = '<span class="watchlistredir">' . $link . '</span>';
                $tools[] = $skin->makeLinkObj( $title->getTalkPage(), wfMsgHtml( 'talkpagelinktext' ) );
-               if( $title->exists() )
+               if( $title->exists() ) {
                        $tools[] = $skin->makeKnownLinkObj( $title, wfMsgHtml( 'history_short' ), 'action=history' );
+               }
+               if( $title->getNamespace() == NS_USER && !$title->isSubpage() ) {
+                       $tools[] = $skin->makeKnownLinkObj( SpecialPage::getTitleFor( 'Contributions', $title->getText() ), wfMsgHtml( 'contributions' ) );
+               }
                return '<li>'
                        . Xml::check( 'titles[]', false, array( 'value' => $title->getPrefixedText() ) )
                        . $link . ' (' . implode( ' | ', $tools ) . ')' . '</li>';