Cleanup in MagicWord::$mVariableIDs, removed IDs that aren't handled in Parser::getVa...
[lhc/web/wiklou.git] / maintenance / rebuildFileCache.php
index 1864924..8c01b90 100644 (file)
@@ -35,6 +35,7 @@ $end += $BATCH_SIZE - 1;
 $blockStart = $start;
 $blockEnd = $start + $BATCH_SIZE - 1;
 
+$dbw = wfGetDB( DB_MASTER );
 // Go through each page and save the output
 while( $blockEnd <= $end ) {
        // Get the pages
@@ -61,8 +62,6 @@ while( $blockEnd <= $end ) {
                                        echo "Page {$row->page_id} already cached\n";
                                        continue; // done already!
                                }
-                       } else {
-                               echo "Page {$row->page_id} not cached\n";
                        }
                        ob_start( array(&$cache, 'saveToFileCache' ) ); // save on ob_end_clean()
                        $wgUseFileCache = false; // hack, we don't want $wgArticle fiddling with filecache
@@ -78,6 +77,7 @@ while( $blockEnd <= $end ) {
                } else {
                        echo "Page {$row->page_id} not cacheable\n";
                }
+               $dbw->commit(); // commit any changes
        }
        $blockStart += $BATCH_SIZE;
        $blockEnd += $BATCH_SIZE;