* (bug 8042) Make miser mode caching limits settable via $wgQueryCacheLimit
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 4 Dec 2006 22:17:12 +0000 (22:17 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 4 Dec 2006 22:17:12 +0000 (22:17 +0000)
  instead of hardcoding to 1000
* Avoid notice when contribs query page class is instantiated in batch mode

RELEASE-NOTES
includes/DefaultSettings.php
includes/SpecialContributions.php
maintenance/updateSpecialPages.php

index 61edf04..52e491c 100644 (file)
@@ -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
 * 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 ==
 
 
 == Languages updated ==
 
index 0a28d7c..546b25b 100644 (file)
@@ -1182,6 +1182,8 @@ $wgAllowExternalImagesFrom = '';
 $wgMiserMode = false;
 /** Disable all query pages if miser mode is on, not just some */
 $wgDisableQueryPages = false;
 $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 */
 /** Generate a watchlist once every hour or so */
 $wgUseWatchlistCache = false;
 /** The hour or so mentioned above */
index 34ab8c3..0a142d7 100644 (file)
@@ -16,7 +16,7 @@ class ContributionsPage extends QueryPage {
         * Constructor.
         * @param $username username to list contribs for (or "newbies" for extra magic)
         */
         * 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 );
        }
 
                $this->user = User::newFromName( $username, false );
        }
 
index a7a72b5..ed06855 100644 (file)
@@ -45,7 +45,7 @@ foreach ( $wgQueryPages as $page ) {
        if ( $queryPage->isExpensive() ) {
                $t1 = explode( ' ', microtime() );
                # Do the query
        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 ) {
                $t2 = explode( ' ', microtime() );
 
                if ( $num === false ) {