Index: trunk/extensions/FlaggedRevs/maintenance/updateAutoPromote.php |
— | — | @@ -4,9 +4,7 @@ |
5 | 5 | require dirname(__FILE__) . '/../../../maintenance/commandLine.inc'; |
6 | 6 | require dirname(__FILE__) . '/updateAutoPromote.inc'; |
7 | 7 | |
8 | | -error_reporting( E_ALL & (~E_NOTICE) ); |
| 8 | +error_reporting( E_ALL ); |
9 | 9 | |
10 | | -$db = wfGetDB( DB_SLAVE ); |
| 10 | +update_autopromote(); |
11 | 11 | |
12 | | -update_autopromote( $db ); |
13 | | - |
Index: trunk/extensions/FlaggedRevs/maintenance/updateAutoPromote.inc |
— | — | @@ -2,8 +2,10 @@ |
3 | 3 | |
4 | 4 | define( 'BATCH_SIZE', 25 ); |
5 | 5 | |
6 | | -function update_autopromote( $db ) { |
| 6 | +function update_autopromote() { |
| 7 | + global $wgContentNamespaces, $wgFlaggedRevsAutopromote; |
7 | 8 | echo "Populating and updating autopromote table\n"; |
| 9 | + $db = wfGetDB( DB_SLAVE ); |
8 | 10 | $start = $db->selectField( 'user', 'MIN(user_id)', false, __FUNCTION__ ); |
9 | 11 | $end = $db->selectField( 'user', 'MAX(user_id)', false, __FUNCTION__ ); |
10 | 12 | if( is_null( $start ) || is_null( $end ) ){ |