Added configuration global $wgDisableQueryPageUpdate to disable certain pages from...
authorTim Starling <tstarling@users.mediawiki.org>
Sat, 30 Dec 2006 16:44:31 +0000 (16:44 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sat, 30 Dec 2006 16:44:31 +0000 (16:44 +0000)
includes/DefaultSettings.php
maintenance/updateSpecialPages.php

index 640642e..01acc51 100644 (file)
@@ -2347,4 +2347,10 @@ $wgParserTestFiles = array(
  */
 $wgBreakFrames = false;
 
+/**
+ * Set this to an array of special page names to prevent 
+ * maintenance/updateSpecialPages.php from updating those pages.
+ */
+$wgDisableQueryPageUpdate = false;
+
 ?>
index ed06855..89b5aa9 100644 (file)
@@ -28,6 +28,11 @@ foreach ( $wgQueryPages as $page ) {
                continue;
        }
 
+       if ( in_array( $special, $wgDisableQueryPageUpdate ) ) {
+               printf("%-30s disabled\n", $special);
+               continue;
+       }
+               
        $specialObj = SpecialPage::getPage( $special );
        if ( !$specialObj ) {
                print "No such special page: $special\n";
@@ -40,7 +45,7 @@ foreach ( $wgQueryPages as $page ) {
        $queryPage = new $class;
 
        if( !(isset($options['only'])) or ($options['only'] == $queryPage->getName()) ) {
-       printf( '%-30s',  $special );
+       printf( '%-30s ',  $special );
 
        if ( $queryPage->isExpensive() ) {
                $t1 = explode( ' ', microtime() );
@@ -80,12 +85,15 @@ foreach ( $wgQueryPages as $page ) {
                }
 
                # Wait for the slave to catch up
+               /*
                $slaveDB =& wfGetDB( DB_SLAVE, array('QueryPage::recache', 'vslow' ) );
                while( $slaveDB->getLag() > 600 ) {
                        print "Slave lagged, waiting...\n";
                        sleep(30);
 
                }
+               */
+               wfWaitForSlaves( 5 );
 
        } else {
                print "cheap, skipped\n";