https://www.mediawiki.org/wiki/Special:Code/MediaWiki/103393

Revision: 103393
Author:   mah
Date:     2011-11-16 21:43:32 +0000 (Wed, 16 Nov 2011)
Log Message:
-----------
Apply patch from Bug 17056 - list items in Special:NewPages should
    each link to the first revision of the page
Patch from Umherirrender

Modified Paths:
--------------
    trunk/phase3/includes/specials/SpecialNewpages.php

Modified: trunk/phase3/includes/specials/SpecialNewpages.php
===================================================================
--- trunk/phase3/includes/specials/SpecialNewpages.php  2011-11-16 21:37:22 UTC 
(rev 103392)
+++ trunk/phase3/includes/specials/SpecialNewpages.php  2011-11-16 21:43:32 UTC 
(rev 103393)
@@ -298,9 +298,16 @@
                $dm = $lang->getDirMark();
 
                $title = Title::makeTitleSafe( $result->rc_namespace, 
$result->rc_title );
-               $time = Html::element( 'span', array( 'class' => 
'mw-newpages-time' ),
+               $spanTime = Html::element( 'span', array( 'class' => 
'mw-newpages-time' ),
                        $lang->timeanddate( $result->rc_timestamp, true )
                );
+               $time = Linker::linkKnown(
+                       $title,
+                       $spanTime,
+                       array(),
+                       array( 'oldid' => $result->rc_this_oldid ),
+                       array()
+               );
 
                $query = array( 'redirect' => 'no' );
 
@@ -501,7 +508,7 @@
                $fields = array(
                        'rc_namespace', 'rc_title', 'rc_cur_id', 'rc_user', 
'rc_user_text',
                        'rc_comment', 'rc_timestamp', 'rc_patrolled','rc_id', 
'rc_deleted',
-                       'page_len AS length', 'page_latest AS rev_id', 'ts_tags'
+                       'page_len AS length', 'page_latest AS rev_id', 
'ts_tags', 'rc_this_oldid'
                );
                $join_conds = array( 'page' => array( 'INNER JOIN', 
'page_id=rc_cur_id' ) );
 


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to