Fix reported database error in updateSpecialPages.php for SpecialMIMEsearch, by retur...
authorRoan Kattouw <catrope@users.mediawiki.org>
Wed, 22 Dec 2010 16:18:24 +0000 (16:18 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Wed, 22 Dec 2010 16:18:24 +0000 (16:18 +0000)
includes/QueryPage.php

index f8db54c..384d5db 100644 (file)
@@ -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;
                }