r111541 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111540‎ | r111541 | r111542 >
Date:14:47, 15 February 2012
Author:jeroendedauw
Status:reverted
Tags:
Comment:
fix call to protected method and killed dead code
Modified paths:
  • /trunk/phase3/includes/DBDataObject.php (modified) (history)
  • /trunk/phase3/includes/DBTable.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DBDataObject.php
@@ -81,15 +81,6 @@
8282 protected $inSummaryMode = false;
8383
8484 /**
85 - * The database connection to use for read operations.
86 - * Can be changed via @see setReadDb.
87 - *
88 - * @since 1.20
89 - * @var integer DB_ enum
90 - */
91 - protected $readDb = DB_SLAVE;
92 -
93 - /**
9485 * Constructor.
9586 *
9687 * @since 1.20
@@ -530,28 +521,6 @@
531522 }
532523
533524 /**
534 - * Get the database type used for read operations.
535 - *
536 - * @since 1.20
537 - *
538 - * @return integer DB_ enum
539 - */
540 - public function getReadDb() {
541 - return $this->readDb;
542 - }
543 -
544 - /**
545 - * Set the database type to use for read operations.
546 - *
547 - * @param integer $db
548 - *
549 - * @since 1.20
550 - */
551 - public function setReadDb( $db ) {
552 - $this->readDb = $db;
553 - }
554 -
555 - /**
556525 * Add an amount (can be negative) to the specified field (needs to be numeric).
557526 *
558527 * @since 1.20
Index: trunk/phase3/includes/DBTable.php
@@ -423,7 +423,7 @@
424424 foreach ( $this->select( null, $conditions ) as /* DBDataObject */ $item ) {
425425 $item->loadSummaryFields( $summaryFields );
426426 $item->setSummaryMode( true );
427 - $item->saveExisting();
 427+ $item->save();
428428 }
429429
430430 $this->setReadDb( DB_SLAVE );

Status & tagging log