Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -528,7 +528,17 @@ |
529 | 529 | $wgAjaxExportList[] = 'ReaderFeedback::AjaxReview'; |
530 | 530 | $wgAjaxExportList[] = 'RevisionReview::AjaxReview'; |
531 | 531 | |
| 532 | +# Cache update |
| 533 | +$wgSpecialPageCacheUpdates[] = 'efFlaggedRevsUnreviewedPagesUpdate'; |
532 | 534 | |
| 535 | +function efFlaggedRevsUnreviewedPagesUpdate() { |
| 536 | + $base = dirname(__FILE__); |
| 537 | + require_once( "$base/maintenance/updateQueryCache.inc" ); |
| 538 | + update_flaggedrevs_querycache(); |
| 539 | + require_once( "$base/maintenance/updateStats.inc" ); |
| 540 | + update_flaggedrevs_stats(); |
| 541 | +} |
| 542 | + |
533 | 543 | # B/C ... |
534 | 544 | $wgLogActions['rights/erevoke'] = 'rights-editor-revoke'; |
535 | 545 | |
Index: trunk/extensions/FlaggedRevs/maintenance/updateQueryCache.inc |
— | — | @@ -10,6 +10,7 @@ |
11 | 11 | if( empty($wgFlaggedRevsNamespaces) ) { |
12 | 12 | return; |
13 | 13 | } |
| 14 | + print( "UnreviewedPages..." ); |
14 | 15 | $dbr = wfGetDB( DB_SLAVE ); |
15 | 16 | $querycache = $dbr->tableName( 'querycache' ); |
16 | 17 | # Find pages that should be listed... |
— | — | @@ -51,5 +52,5 @@ |
52 | 53 | $dbw->delete( 'querycache_info', array( 'qci_type' => 'fr_unreviewedpages' ), __METHOD__ ); |
53 | 54 | $dbw->insert( 'querycache_info', array( 'qci_type' => 'fr_unreviewedpages', |
54 | 55 | 'qci_timestamp' => $dbw->timestamp() ), __METHOD__ ); |
55 | | - print( "Done updating unreviewed pages list!\n" ); |
| 56 | + print( "done!\n" ); |
56 | 57 | } |
Index: trunk/extensions/FlaggedRevs/maintenance/updateStats.inc |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | $ns = $dbr->makeList( $wgFlaggedRevsNamespaces ); |
19 | 19 | if( empty($ns) ) return; // no SQL errors please :) |
20 | 20 | |
21 | | - print( "Updating flaggedrevs stats...\n" ); |
| 21 | + print( "ValidationStatistics..." ); |
22 | 22 | |
23 | 23 | $ns_total = array(); |
24 | 24 | $ns_reviewed = array(); |
— | — | @@ -186,7 +186,7 @@ |
187 | 187 | $key = wfMemcKey( 'flaggedrevs', 'statsUpdated' ); |
188 | 188 | $dbCache->set( $key, '1', $wgFlaggedRevsStatsAge ); |
189 | 189 | $dbCache->delete( $keySQL ); |
190 | | - print( "...done updating!\n" ); |
| 190 | + print( "done updating!\n" ); |
191 | 191 | } |
192 | 192 | |
193 | 193 | function createFlaggedRevsStatsTable( $dbw, $flaggedrevs_stats ) { |