r103641 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103640‎ | r103641 | r103642 >
Date:05:37, 19 November 2011
Author:aaron
Status:ok
Tags:
Comment:
Made ChangesList generate page links with rcid=x for new pages when $wgUseNPPatrol is on (not just $wgUseRCPatrol)
Modified paths:
  • /trunk/phase3/includes/ChangesList.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ChangesList.php
@@ -483,6 +483,18 @@
484484 public function insertExtra( &$s, &$rc, &$classes ) {
485485 ## Empty, used for subclassers to add anything special.
486486 }
 487+
 488+ protected function showAsUnpatrolled( RecentChange $rc ) {
 489+ $unpatrolled = false;
 490+ if ( !$rc->mAttribs['rc_patrolled'] ) {
 491+ if ( $this->getUser()->useRCPatrol() ) {
 492+ $unpatrolled = true;
 493+ } elseif ( $this->getUser()->useNPPatrol() && $rc->mAttribs['rc_new'] ) {
 494+ $unpatrolled = true;
 495+ }
 496+ }
 497+ return $unpatrolled;
 498+ }
487499 }
488500
489501
@@ -498,8 +510,9 @@
499511 public function recentChangesLine( &$rc, $watched = false, $linenumber = null ) {
500512 global $wgRCShowChangedSize;
501513 wfProfileIn( __METHOD__ );
 514+
502515 # Should patrol-related stuff be shown?
503 - $unpatrolled = $this->getUser()->useRCPatrol() && !$rc->mAttribs['rc_patrolled'];
 516+ $unpatrolled = $this->showAsUnpatrolled( $rc );
504517
505518 $dateheader = ''; // $s now contains only <li>...</li>, for hooks' convenience.
506519 $this->insertDateHeader( $dateheader, $rc->mAttribs['rc_timestamp'] );
@@ -633,11 +646,7 @@
634647 }
635648
636649 # Should patrol-related stuff be shown?
637 - if( $this->getUser()->useRCPatrol() ) {
638 - $rc->unpatrolled = !$rc->mAttribs['rc_patrolled'];
639 - } else {
640 - $rc->unpatrolled = false;
641 - }
 650+ $rc->unpatrolled = $this->showAsUnpatrolled( $rc );
642651
643652 $showdifflinks = true;
644653 # Make article link

Follow-up revisions

RevisionCommit summaryAuthorDate
r104250MFT r103641 for bug 31745aaron17:41, 25 November 2011

Status & tagging log