Index: trunk/extensions/FlaggedRevs/api/ApiQueryOldreviewedpages.php |
— | — | @@ -41,7 +41,7 @@ |
42 | 42 | } |
43 | 43 | |
44 | 44 | private function run( $resultPageSet = null ) { |
45 | | - global $wgUser; |
| 45 | + global $wgUser, $wgMemc; |
46 | 46 | $params = $this->extractRequestParams(); |
47 | 47 | |
48 | 48 | // Construct SQL Query |
— | — | @@ -122,6 +122,8 @@ |
123 | 123 | |
124 | 124 | if ( is_null( $resultPageSet ) ) { |
125 | 125 | $title = Title::newFromRow( $row ); |
| 126 | + $key = wfMemcKey( 'stableDiffs', 'underReview', |
| 127 | + $row->fp_stable, $row->page_latest ); |
126 | 128 | $data[] = array( |
127 | 129 | 'pageid' => intval( $row->page_id ), |
128 | 130 | 'ns' => intval( $title->getNamespace() ), |
— | — | @@ -131,7 +133,8 @@ |
132 | 134 | 'pending_since' => wfTimestamp( TS_ISO_8601, $row->fp_pending_since ), |
133 | 135 | 'flagged_level' => intval( $row->fp_quality ), |
134 | 136 | 'flagged_level_text' => FlaggedRevs::getQualityLevelText( $row->fp_quality ), |
135 | | - 'diff_size' => (int)$row->page_len - (int)$row->rev_len |
| 137 | + 'diff_size' => (int)$row->page_len - (int)$row->rev_len, |
| 138 | + 'under_review' => (bool)$wgMemc->get( $key ) |
136 | 139 | ); |
137 | 140 | } else { |
138 | 141 | $resultPageSet->processDbRow( $row ); |
Index: trunk/extensions/FlaggedRevs/api/ApiQueryUnreviewedpages.php |
— | — | @@ -41,6 +41,7 @@ |
42 | 42 | } |
43 | 43 | |
44 | 44 | private function run( $resultPageSet = null ) { |
| 45 | + global $wgMemc; |
45 | 46 | $params = $this->extractRequestParams(); |
46 | 47 | |
47 | 48 | // Construct SQL Query |
— | — | @@ -95,11 +96,13 @@ |
96 | 97 | |
97 | 98 | if ( is_null( $resultPageSet ) ) { |
98 | 99 | $title = Title::newFromRow( $row ); |
| 100 | + $key = wfMemcKey( 'unreviewedPages', 'underReview', $row->page_id ); |
99 | 101 | $data[] = array( |
100 | | - 'pageid' => intval( $row->page_id ), |
101 | | - 'ns' => intval( $title->getNamespace() ), |
102 | | - 'title' => $title->getPrefixedText(), |
103 | | - 'revid' => intval( $row->page_latest ), |
| 102 | + 'pageid' => intval( $row->page_id ), |
| 103 | + 'ns' => intval( $title->getNamespace() ), |
| 104 | + 'title' => $title->getPrefixedText(), |
| 105 | + 'revid' => intval( $row->page_latest ), |
| 106 | + 'under_review' => (bool)$wgMemc->get( $key ) |
104 | 107 | ); |
105 | 108 | } else { |
106 | 109 | $resultPageSet->processDbRow( $row ); |