Index: trunk/extensions/FlaggedRevs/maintenance/purgeReviewablePages.inc |
— | — | @@ -5,11 +5,13 @@ |
6 | 6 | echo "Purging squid cache for all reviewable pages...\n"; |
7 | 7 | if ( !$wgUseSquid || !$wgUseFileCache ) { |
8 | 8 | echo "Squid/file cache not enabled...nothing to purge.\n"; |
| 9 | + } elseif ( empty( $wgFlaggedRevsNamespaces ) ) { |
| 10 | + echo "There are no reviewable namespaces...nothing to purge.\n"; |
9 | 11 | } |
10 | 12 | $BATCH_SIZE = 500; |
11 | 13 | $start = $db->selectField( 'page', 'MIN(page_id)', false, __FUNCTION__ ); |
12 | 14 | $end = $db->selectField( 'page', 'MAX(page_id)', false, __FUNCTION__ ); |
13 | | - if ( is_null( $start ) || is_null( $end ) ){ |
| 15 | + if ( is_null( $start ) || is_null( $end ) ) { |
14 | 16 | echo "...page table seems to be empty.\n"; |
15 | 17 | return; |
16 | 18 | } |