r78140 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78139‎ | r78140 | r78141 >
Date:21:28, 9 December 2010
Author:aaron
Status:ok
Tags:
Comment:
* Made addToRCQuery() more selective for RCL. The RC hook should really require a field list too...
* Fixed addToChangeListLine() for bug 15515
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php
@@ -1602,9 +1602,10 @@
16031603 ) {
16041604 $tables[] = 'flaggedpages';
16051605 $join_conds['flaggedpages'] = array( 'LEFT JOIN', 'fp_page_id = rc_cur_id' );
1606 - if( is_array( $select ) ) {
 1606+ if( is_array( $select ) ) { // RCL
16071607 $dbr = wfGetDB( DB_SLAVE );
1608 - $select[] = $dbr->tableName( 'flaggedpages' ) . '.*';
 1608+ $select[] = 'fp_stable';
 1609+ $select[] = 'fp_pending_since';
16091610 }
16101611 return true;
16111612 }
@@ -1615,6 +1616,7 @@
16161617 global $wgUser;
16171618 if ( $wgUser->isAllowed( 'review' ) ) {
16181619 $fields[] = 'fp_stable';
 1620+ $fields[] = 'fp_pending_since';
16191621 $tables[] = 'flaggedpages';
16201622 $join_conds['flaggedpages'] = array( 'LEFT JOIN', 'fp_page_id = rc_cur_id' );
16211623 }
@@ -1743,7 +1745,7 @@
17441746 global $wgUser;
17451747 $title = $rc->getTitle(); // convenience
17461748 if ( !FlaggedRevs::inReviewNamespace( $title )
1747 - || empty( $rc->mAttribs['rc_this_oldid'] )
 1749+ || empty( $rc->mAttribs['rc_this_oldid'] ) // rev, not log
17481750 || !array_key_exists( 'fp_stable', $rc->mAttribs ) )
17491751 {
17501752 return true; // confirm that page is in reviewable namespace
@@ -1757,8 +1759,8 @@
17581760 $rlink = wfMsgHtml( 'revreview-unreviewedpage' );
17591761 $css = 'flaggedrevs-unreviewed';
17601762 }
1761 - // page is reviewed and has pending edits
1762 - } elseif ( $rc->mAttribs['rc_this_oldid'] > $rc->mAttribs['fp_stable'] ) {
 1763+ // page is reviewed and has pending edits (use timestamps; bug 15515)
 1764+ } elseif ( $rc->mAttribs['rc_timestamp'] > $rc->mAttribs['fp_pending_since'] ) {
17631765 $rlink = $list->skin->link(
17641766 $title,
17651767 wfMsgHtml( 'revreview-reviewlink' ),

Follow-up revisions

RevisionCommit summaryAuthorDate
r78557*Made 'excludeLastDays' act on 'totalContentEdits'/'totalCheckedEdits' too...aaron06:03, 18 December 2010
r78649Merged r78044 from trunk ( bug 15515 )pdhanda23:29, 20 December 2010
r78650Merged r78051 from trunk ( bug 15515 )pdhanda23:30, 20 December 2010
r78651Merged r78092 from trunk ( bug 15515 )pdhanda23:32, 20 December 2010
r78729Merged r78166 from trunk (bug 15515)pdhanda19:57, 21 December 2010
r80733MFT first round of FlaggedRevs fixes r78517, r78346, r78319, r78293, r78226, ...demon23:56, 21 January 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78044* (bug 15515) Fixed history highlighting and getPendingRevCount() to handle t...aaron05:17, 8 December 2010
r78051*(bug 15515) Fixed addToContribsLine() and addDraftTab() query w.r.t page imp...aaron07:31, 8 December 2010
r78092Improved getDiffRevMsgAndClass() for bug 15515aaron19:42, 8 December 2010

Status & tagging log