*/
protected $inSummaryMode = false;
- /**
- * The database connection to use for read operations.
- * Can be changed via @see setReadDb.
- *
- * @since 1.20
- * @var integer DB_ enum
- */
- protected $readDb = DB_SLAVE;
-
/**
* Constructor.
*
}
}
- /**
- * Get the database type used for read operations.
- *
- * @since 1.20
- *
- * @return integer DB_ enum
- */
- public function getReadDb() {
- return $this->readDb;
- }
-
- /**
- * Set the database type to use for read operations.
- *
- * @param integer $db
- *
- * @since 1.20
- */
- public function setReadDb( $db ) {
- $this->readDb = $db;
- }
-
/**
* Add an amount (can be negative) to the specified field (needs to be numeric).
*
foreach ( $this->select( null, $conditions ) as /* DBDataObject */ $item ) {
$item->loadSummaryFields( $summaryFields );
$item->setSummaryMode( true );
- $item->saveExisting();
+ $item->save();
}
$this->setReadDb( DB_SLAVE );