wfGetDB() needs a parameter.
authorTim Starling <tstarling@users.mediawiki.org>
Sun, 21 Sep 2008 08:44:20 +0000 (08:44 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sun, 21 Sep 2008 08:44:20 +0000 (08:44 +0000)
includes/Article.php

index 7b41a08..eeff834 100644 (file)
@@ -2137,7 +2137,7 @@ class Article {
         * @return int approximate revision count
         */
        function estimateRevisionCount() {
-               $dbr = wfGetDB();
+               $dbr = wfGetDB( DB_SLAVE );
                // For an exact count...
                //return $dbr->selectField( 'revision', 'COUNT(*)',
                //      array( 'rev_page' => $this->getId() ), __METHOD__ );