* (bug 24563) Entries on Special:WhatLinksHere now have a link to their history
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 1 Aug 2010 09:20:30 +0000 (09:20 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sun, 1 Aug 2010 09:20:30 +0000 (09:20 +0000)
RELEASE-NOTES
includes/specials/SpecialWhatlinkshere.php

index 14dd42b..c450da7 100644 (file)
@@ -120,6 +120,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   easily replicated by custom user scripts for those who really want it.
 * Non-file pages can no longer be moved to the file namespace, nor vice versa.
 * (bug 671) The <dfn> element has been whitelisted in user input.
+* (bug 24563) Entries on Special:WhatLinksHere now have a link to their history
 
 === Bug fixes in 1.17 ===
 * (bug 17560) Half-broken deletion moved image files to deletion archive
index 23651b9..ac2f931 100644 (file)
@@ -262,11 +262,13 @@ class SpecialWhatLinksHere extends SpecialPage {
        }
 
        protected function listItem( $row, $nt, $notClose = false ) {
+               global $wgLang;
+
                # local message cache
                static $msgcache = null;
                if ( $msgcache === null ) {
                        static $msgs = array( 'isredirect', 'istemplate', 'semicolon-separator',
-                               'whatlinkshere-links', 'isimage' );
+                               'whatlinkshere-links', 'isimage', 'hist' );
                        $msgcache = array();
                        foreach ( $msgs as $msg ) {
                                $msgcache[$msg] = wfMsgExt( $msg, array( 'escapenoentities' ) );
@@ -301,8 +303,10 @@ class SpecialWhatLinksHere extends SpecialPage {
                }
 
                # Space for utilities links, with a what-links-here link provided
-               $wlhLink = $this->wlhLink( $nt, $msgcache['whatlinkshere-links'] );
-               $wlh = Xml::wrapClass( "($wlhLink)", 'mw-whatlinkshere-tools' );
+               $tools = array();
+               $tools[] = $this->wlhLink( $nt, $msgcache['whatlinkshere-links'] );
+               $tools[] = $this->skin->linkKnown( $nt, $msgcache['hist'], array(), array( 'action' => 'history' ) );
+               $wlh = Xml::wrapClass( '(' . $wgLang->pipeList( $tools ) . ')', 'mw-whatlinkshere-tools' );
 
                return $notClose ?
                        Xml::openElement( 'li' ) . "$link $propsText $wlh\n" :