r88384 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88383‎ | r88384 | r88385 >
Date:19:29, 18 May 2011
Author:ialex
Status:ok
Tags:
Comment:
DB_READ -> DB_SLAVE, the former is obsolete
Modified paths:
  • /trunk/phase3/includes/Block.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialBlock.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialProtectedpages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialBlock.php
@@ -742,7 +742,7 @@
743743 public static function parseExpiryInput( $expiry ) {
744744 static $infinity;
745745 if( $infinity == null ){
746 - $infinity = wfGetDB( DB_READ )->getInfinity();
 746+ $infinity = wfGetDB( DB_SLAVE )->getInfinity();
747747 }
748748 if ( $expiry == 'infinite' || $expiry == 'indefinite' ) {
749749 $expiry = $infinity;
Index: trunk/phase3/includes/specials/SpecialProtectedpages.php
@@ -84,7 +84,7 @@
8585
8686 if( is_null( $skin ) ){
8787 $skin = $wgUser->getSkin();
88 - $infinity = wfGetDB( DB_READ )->getInfinity();
 88+ $infinity = wfGetDB( DB_SLAVE )->getInfinity();
8989 }
9090
9191 $title = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
Index: trunk/phase3/includes/Block.php
@@ -612,7 +612,7 @@
613613 $autoblock->mHideName = $this->mHideName;
614614 $autoblock->prevents( 'editownusertalk', $this->prevents( 'editownusertalk' ) );
615615
616 - $dbr = wfGetDB( DB_READ );
 616+ $dbr = wfGetDB( DB_SLAVE );
617617 if ( $this->mTimestamp == $dbr->getInfinity() ) {
618618 # Original block was indefinite, start an autoblock now
619619 $autoblock->mExpiry = Block::getAutoblockExpiry( wfTimestampNow() );

Status & tagging log