From: Ævar Arnfjörð Bjarmason Date: Wed, 12 Oct 2005 03:46:42 +0000 (+0000) Subject: * Supporting a third paramater in $wgQueryPages, the number of pages that X-Git-Tag: 1.6.0~1454 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=cd5b785be10b9aa48d4d7ba4e4d544c8b2a97ec7;p=lhc%2Fweb%2Fwiklou.git * Supporting a third paramater in $wgQueryPages, the number of pages that should be cached in the querycache --- diff --git a/maintenance/updateSpecialPages.php b/maintenance/updateSpecialPages.php index 880bed1d95..0db2aef995 100644 --- a/maintenance/updateSpecialPages.php +++ b/maintenance/updateSpecialPages.php @@ -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 ) {