r103393 MediaWiki - Code Review archive


Article Images
Repository:MediaWiki
Revision:r103392‎ | r103393 | r103394 >
Date:21:43, 16 November 2011
Author:mah
Status:ok (Comments)
Tags:
Comment:

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) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialNewpages.php
@@ -298,9 +298,16 @@
299299 $dm = $lang->getDirMark();
300300
301301 $title = Title::makeTitleSafe( $result->rc_namespace, $result->rc_title );
302 - $time = Html::element( 'span', array( 'class' => 'mw-newpages-time' ),
 302+ $spanTime = Html::element( 'span', array( 'class' => 'mw-newpages-time' ),
303303 $lang->timeanddate( $result->rc_timestamp, true )
304304 );
 305+ $time = Linker::linkKnown(
 306+ $title,
 307+ $spanTime,
 308+ array(),
 309+ array( 'oldid' => $result->rc_this_oldid ),
 310+ array()
 311+ );
305312
306313 $query = array( 'redirect' => 'no' );
307314
@@ -501,7 +508,7 @@
502509 $fields = array(
503510 'rc_namespace', 'rc_title', 'rc_cur_id', 'rc_user', 'rc_user_text',
504511 'rc_comment', 'rc_timestamp', 'rc_patrolled','rc_id', 'rc_deleted',
505 - 'page_len AS length', 'page_latest AS rev_id', 'ts_tags'
 512+ 'page_len AS length', 'page_latest AS rev_id', 'ts_tags', 'rc_this_oldid'
506513 );
507514 $join_conds = array( 'page' => array( 'INNER JOIN', 'page_id=rc_cur_id' ) );
508515

Status & tagging log