Index: trunk/phase3/includes/Article.php |
— | — | @@ -527,10 +527,6 @@ |
528 | 528 | /** |
529 | 529 | * Get the database which should be used for reads |
530 | 530 | * |
531 | | - * This is deprecated, just use wfGetDB() instead |
532 | | - * |
533 | | - * @deprecated |
534 | | - * |
535 | 531 | * @return Database |
536 | 532 | */ |
537 | 533 | function &getDB() { |
— | — | @@ -580,7 +576,7 @@ |
581 | 577 | function getCount() { |
582 | 578 | if ( -1 == $this->mCounter ) { |
583 | 579 | $id = $this->getID(); |
584 | | - $dbr =& wfGetDB( DB_SLAVE ); |
| 580 | + $dbr =& $this->getDB(); |
585 | 581 | $this->mCounter = $dbr->selectField( 'page', 'page_counter', array( 'page_id' => $id ), |
586 | 582 | 'Article::getCount', $this->getSelectOptions() ); |
587 | 583 | } |
— | — | @@ -694,7 +690,7 @@ |
695 | 691 | |
696 | 692 | $title = $this->mTitle; |
697 | 693 | $contribs = array(); |
698 | | - $dbr =& wfGetDB( DB_SLAVE ); |
| 694 | + $dbr =& $this->getDB(); |
699 | 695 | $revTable = $dbr->tableName( 'revision' ); |
700 | 696 | $userTable = $dbr->tableName( 'user' ); |
701 | 697 | $encDBkey = $dbr->addQuotes( $title->getDBkey() ); |
— | — | @@ -1740,7 +1736,7 @@ |
1741 | 1737 | # determine whether this page has earlier revisions |
1742 | 1738 | # and insert a warning if it does |
1743 | 1739 | # we select the text because it might be useful below |
1744 | | - $dbr =& wfGetDB( DB_SLAVE ); |
| 1740 | + $dbr =& $this->getDB(); |
1745 | 1741 | $ns = $this->mTitle->getNamespace(); |
1746 | 1742 | $title = $this->mTitle->getDBkey(); |
1747 | 1743 | $revisions = $dbr->select( array( 'page', 'revision' ), |