From: Brion Vibber Date: Mon, 4 Dec 2006 22:17:12 +0000 (+0000) Subject: * (bug 8042) Make miser mode caching limits settable via $wgQueryCacheLimit X-Git-Tag: 1.31.0-rc.0~54991 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=96e1de79676f39ef96eb862195700b255363ef74;p=lhc%2Fweb%2Fwiklou.git * (bug 8042) Make miser mode caching limits settable via $wgQueryCacheLimit instead of hardcoding to 1000 * Avoid notice when contribs query page class is instantiated in batch mode --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 61edf049f4..52e491cf36 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -249,6 +249,10 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Added js variable wgCurRevisionId to the output * Added js variable wgOldId which shows the oldid when viewing an old revision * (bug 8141) Cleanup of Parser::doTableStuff, patch by AzaTht +* (bug 8042) Make miser mode caching limits settable via $wgQueryCacheLimit + instead of hardcoding to 1000 +* Avoid notice when contribs query page class is instantiated in batch mode + == Languages updated == diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 0a28d7c860..546b25bd6a 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1182,6 +1182,8 @@ $wgAllowExternalImagesFrom = ''; $wgMiserMode = false; /** Disable all query pages if miser mode is on, not just some */ $wgDisableQueryPages = false; +/** Number of rows to cache in 'querycache' table when miser mode is on */ +$wgQueryCacheLimit = 1000; /** Generate a watchlist once every hour or so */ $wgUseWatchlistCache = false; /** The hour or so mentioned above */ diff --git a/includes/SpecialContributions.php b/includes/SpecialContributions.php index 34ab8c3a3e..0a142d79a6 100644 --- a/includes/SpecialContributions.php +++ b/includes/SpecialContributions.php @@ -16,7 +16,7 @@ class ContributionsPage extends QueryPage { * Constructor. * @param $username username to list contribs for (or "newbies" for extra magic) */ - function __construct( $username ) { + function __construct( $username='' ) { $this->user = User::newFromName( $username, false ); } diff --git a/maintenance/updateSpecialPages.php b/maintenance/updateSpecialPages.php index a7a72b5800..ed06855a14 100644 --- a/maintenance/updateSpecialPages.php +++ b/maintenance/updateSpecialPages.php @@ -45,7 +45,7 @@ foreach ( $wgQueryPages as $page ) { if ( $queryPage->isExpensive() ) { $t1 = explode( ' ', microtime() ); # Do the query - $num = $queryPage->recache( $limit === null ? 1000 : $limit ); + $num = $queryPage->recache( $limit === null ? $wgQueryCacheLimit : $limit ); $t2 = explode( ' ', microtime() ); if ( $num === false ) {