* Supporting a third paramater in $wgQueryPages, the number of pages that
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Wed, 12 Oct 2005 03:46:42 +0000 (03:46 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Wed, 12 Oct 2005 03:46:42 +0000 (03:46 +0000)
  should be cached in the querycache

maintenance/updateSpecialPages.php

index 880bed1..0db2aef 100644 (file)
@@ -19,7 +19,7 @@ $wgOut->disable();
 $dbw =& wfGetDB( DB_MASTER );
 
 foreach ( $wgQueryPages as $page ) {
-       list( $class, $special ) = $page;
+       @list( $class, $special, $limit ) = $page;
 
        $specialObj = SpecialPage::getPage( $special );
        if ( !$specialObj ) {
@@ -38,7 +38,7 @@ foreach ( $wgQueryPages as $page ) {
        if ( $queryPage->isExpensive() ) {
                $t1 = explode( ' ', microtime() );
                # Do the query
-               $num = $queryPage->recache();
+               $num = $queryPage->recache( $limit === null ? 1000 : $limit );
                $t2 = explode( ' ', microtime() );
 
                if ( $num === false ) {