From 368749d6c133d202f3ebc074d78befac005248be Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sun, 8 Jan 2006 00:44:07 +0000 Subject: [PATCH] * Reverting ->getDB() => wfGetDB() in 1.434, not replication-safe --- includes/Article.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index bb3c81aa45..4593e3115d 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -527,10 +527,6 @@ class Article { /** * Get the database which should be used for reads * - * This is deprecated, just use wfGetDB() instead - * - * @deprecated - * * @return Database */ function &getDB() { @@ -580,7 +576,7 @@ class Article { function getCount() { if ( -1 == $this->mCounter ) { $id = $this->getID(); - $dbr =& wfGetDB( DB_SLAVE ); + $dbr =& $this->getDB(); $this->mCounter = $dbr->selectField( 'page', 'page_counter', array( 'page_id' => $id ), 'Article::getCount', $this->getSelectOptions() ); } @@ -694,7 +690,7 @@ class Article { $title = $this->mTitle; $contribs = array(); - $dbr =& wfGetDB( DB_SLAVE ); + $dbr =& $this->getDB(); $revTable = $dbr->tableName( 'revision' ); $userTable = $dbr->tableName( 'user' ); $encDBkey = $dbr->addQuotes( $title->getDBkey() ); @@ -1740,7 +1736,7 @@ class Article { # determine whether this page has earlier revisions # and insert a warning if it does # we select the text because it might be useful below - $dbr =& wfGetDB( DB_SLAVE ); + $dbr =& $this->getDB(); $ns = $this->mTitle->getNamespace(); $title = $this->mTitle->getDBkey(); $revisions = $dbr->select( array( 'page', 'revision' ), -- 2.20.1