MediaWiki r18162 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r18161‎ | r18162 (on ViewVC)‎ | r18163 >
Date:22:17, 4 December 2006
Author:brion
Status:old
Tags:
Comment:
* (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
Modified paths:

Diff [purge]

Index: trunk/phase3/maintenance/updateSpecialPages.php
@@ -45,7 +45,7 @@
4646 if ( $queryPage->isExpensive() ) {
4747 $t1 = explode( ' ', microtime() );
4848 # Do the query
49 - $num = $queryPage->recache( $limit === null ? 1000 : $limit );
 49+ $num = $queryPage->recache( $limit === null ? $wgQueryCacheLimit : $limit );
5050 $t2 = explode( ' ', microtime() );
5151
5252 if ( $num === false ) {
Index: trunk/phase3/includes/SpecialContributions.php
@@ -16,7 +16,7 @@
1717 * Constructor.
1818 * @param $username username to list contribs for (or "newbies" for extra magic)
1919 */
20 - function __construct( $username ) {
 20+ function __construct( $username='' ) {
2121 $this->user = User::newFromName( $username, false );
2222 }
2323
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1182,6 +1182,8 @@
11831183 $wgMiserMode = false;
11841184 /** Disable all query pages if miser mode is on, not just some */
11851185 $wgDisableQueryPages = false;
 1186+/** Number of rows to cache in 'querycache' table when miser mode is on */
 1187+$wgQueryCacheLimit = 1000;
11861188 /** Generate a watchlist once every hour or so */
11871189 $wgUseWatchlistCache = false;
11881190 /** The hour or so mentioned above */
Index: trunk/phase3/RELEASE-NOTES
@@ -249,7 +249,11 @@
250250 * Added js variable wgCurRevisionId to the output
251251 * Added js variable wgOldId which shows the oldid when viewing an old revision
252252 * (bug 8141) Cleanup of Parser::doTableStuff, patch by AzaTht
 253+* (bug 8042) Make miser mode caching limits settable via $wgQueryCacheLimit
 254+ instead of hardcoding to 1000
 255+* Avoid notice when contribs query page class is instantiated in batch mode
253256
 257+
254258 == Languages updated ==
255259
256260 * Bishnupriya Manipuri (bpy)