Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -1602,9 +1602,10 @@ |
1603 | 1603 | ) { |
1604 | 1604 | $tables[] = 'flaggedpages'; |
1605 | 1605 | $join_conds['flaggedpages'] = array( 'LEFT JOIN', 'fp_page_id = rc_cur_id' ); |
1606 | | - if( is_array( $select ) ) { |
| 1606 | + if( is_array( $select ) ) { // RCL |
1607 | 1607 | $dbr = wfGetDB( DB_SLAVE ); |
1608 | | - $select[] = $dbr->tableName( 'flaggedpages' ) . '.*'; |
| 1608 | + $select[] = 'fp_stable'; |
| 1609 | + $select[] = 'fp_pending_since'; |
1609 | 1610 | } |
1610 | 1611 | return true; |
1611 | 1612 | } |
— | — | @@ -1615,6 +1616,7 @@ |
1616 | 1617 | global $wgUser; |
1617 | 1618 | if ( $wgUser->isAllowed( 'review' ) ) { |
1618 | 1619 | $fields[] = 'fp_stable'; |
| 1620 | + $fields[] = 'fp_pending_since'; |
1619 | 1621 | $tables[] = 'flaggedpages'; |
1620 | 1622 | $join_conds['flaggedpages'] = array( 'LEFT JOIN', 'fp_page_id = rc_cur_id' ); |
1621 | 1623 | } |
— | — | @@ -1743,7 +1745,7 @@ |
1744 | 1746 | global $wgUser; |
1745 | 1747 | $title = $rc->getTitle(); // convenience |
1746 | 1748 | if ( !FlaggedRevs::inReviewNamespace( $title ) |
1747 | | - || empty( $rc->mAttribs['rc_this_oldid'] ) |
| 1749 | + || empty( $rc->mAttribs['rc_this_oldid'] ) // rev, not log |
1748 | 1750 | || !array_key_exists( 'fp_stable', $rc->mAttribs ) ) |
1749 | 1751 | { |
1750 | 1752 | return true; // confirm that page is in reviewable namespace |
— | — | @@ -1757,8 +1759,8 @@ |
1758 | 1760 | $rlink = wfMsgHtml( 'revreview-unreviewedpage' ); |
1759 | 1761 | $css = 'flaggedrevs-unreviewed'; |
1760 | 1762 | } |
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'] ) { |
1763 | 1765 | $rlink = $list->skin->link( |
1764 | 1766 | $title, |
1765 | 1767 | wfMsgHtml( 'revreview-reviewlink' ), |