From 740ce3933b6c1291f0d297ecf9668e9fc3b054d5 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Wed, 22 Dec 2010 16:18:24 +0000 Subject: [PATCH] Fix reported database error in updateSpecialPages.php for SpecialMIMEsearch, by returning 0 rather than false from QueryPage::recache() for uncacheable pages --- includes/QueryPage.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } -- 2.20.1