From: Roan Kattouw Date: Wed, 22 Dec 2010 16:18:24 +0000 (+0000) Subject: Fix reported database error in updateSpecialPages.php for SpecialMIMEsearch, by retur... X-Git-Tag: 1.31.0-rc.0~33185 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=740ce3933b6c1291f0d297ecf9668e9fc3b054d5;p=lhc%2Fweb%2Fwiklou.git Fix reported database error in updateSpecialPages.php for SpecialMIMEsearch, by returning 0 rather than false from QueryPage::recache() for uncacheable pages --- diff --git a/includes/QueryPage.php b/includes/QueryPage.php index f8db54c1b6..384d5dbad9 100644 --- a/includes/QueryPage.php +++ b/includes/QueryPage.php @@ -270,10 +270,14 @@ abstract class QueryPage extends SpecialPage { * @param $ignoreErrors Boolean: whether to ignore database errors */ function recache( $limit, $ignoreErrors = true ) { + if ( !$this->isCacheable() ) { + return 0; + } + $fname = get_class( $this ) . '::recache'; $dbw = wfGetDB( DB_MASTER ); $dbr = wfGetDB( DB_SLAVE, array( $this->getName(), __METHOD__, 'vslow' ) ); - if ( !$dbw || !$dbr || !$this->isCacheable() ) { + if ( !$dbw || !$dbr ) { return false; }