Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php |
— | — | @@ -730,13 +730,13 @@ |
731 | 731 | ); |
732 | 732 | # Get the timestamp of the first edit after the stable version (if any)... |
733 | 733 | $nextTimestamp = null; |
734 | | - $revId = $rev->getId(); |
735 | | - if ( $latest != $revId ) { |
736 | | - $timestamp = $rev->getTimestamp(); |
| 734 | + if ( $rev->getId() != $latest ) { |
| 735 | + $timestamp = $dbw->timestamp( $rev->getTimestamp() ); |
737 | 736 | $nextEditTS = $dbw->selectField( 'revision', |
738 | 737 | 'rev_timestamp', |
739 | | - array( 'rev_page' => $article->getId(), |
740 | | - "rev_timestamp > " . $dbw->addQuotes( $dbw->timestamp( $timestamp ) ) ), |
| 738 | + array( |
| 739 | + 'rev_page' => $article->getId(), |
| 740 | + "rev_timestamp > " . $dbw->addQuotes( $timestamp ) ), |
741 | 741 | __METHOD__, |
742 | 742 | array( 'ORDER BY' => 'rev_timestamp ASC', 'LIMIT' => 1 ) |
743 | 743 | ); |
— | — | @@ -748,10 +748,10 @@ |
749 | 749 | $dbw->replace( 'flaggedpages', |
750 | 750 | array( 'fp_page_id' ), |
751 | 751 | array( |
752 | | - 'fp_stable' => $revId, |
753 | | - 'fp_reviewed' => ( $latest == $revId ) ? 1 : 0, |
| 752 | + 'fp_page_id' => $article->getId(), |
| 753 | + 'fp_stable' => $rev->getId(), |
| 754 | + 'fp_reviewed' => ( $nextTimestamp === null ) ? 1 : 0, |
754 | 755 | 'fp_quality' => ( $maxQuality === false ) ? null : $maxQuality, |
755 | | - 'fp_page_id' => $article->getId(), |
756 | 756 | 'fp_pending_since' => $dbw->timestampOrNull( $nextTimestamp ) |
757 | 757 | ), |
758 | 758 | __METHOD__ |