r45781 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45780‎ | r45781 | r45782 >
Date:18:46, 15 January 2009
Author:aaron
Status:ok
Tags:
Comment:
Add &redirect=no to newpages links (bug 14353)
Modified paths:
  • /trunk/phase3/includes/specials/SpecialNewpages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialNewpages.php
@@ -239,7 +239,8 @@
240240
241241 $title = Title::makeTitleSafe( $result->rc_namespace, $result->rc_title );
242242 $time = $wgLang->timeAndDate( $result->rc_timestamp, true );
243 - $plink = $this->skin->makeKnownLinkObj( $title, '', $this->patrollable( $result ) ? 'rcid=' . $result->rc_id : '' );
 243+ $query = $this->patrollable( $result ) ? "rcid={$result->rc_id}&redirect=no" : 'redirect=no';
 244+ $plink = $this->skin->makeKnownLinkObj( $title, '', $query );
244245 $hist = $this->skin->makeKnownLinkObj( $title, wfMsgHtml( 'hist' ), 'action=history' );
245246 $length = wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ),
246247 $wgLang->formatNum( $result->length ) );

Status & tagging log