From: Jeroen De Dauw Date: Wed, 15 Feb 2012 14:47:25 +0000 (+0000) Subject: fix call to protected method and killed dead code X-Git-Tag: 1.31.0-rc.0~24705 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=bee8e6d6529e2b09d05a59f957bbdd4ac32e413c;p=lhc%2Fweb%2Fwiklou.git fix call to protected method and killed dead code --- diff --git a/includes/DBDataObject.php b/includes/DBDataObject.php index 3fa528516f..791f377c16 100644 --- a/includes/DBDataObject.php +++ b/includes/DBDataObject.php @@ -80,15 +80,6 @@ abstract class DBDataObject { */ 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. * @@ -529,28 +520,6 @@ abstract class DBDataObject { } } - /** - * 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). * diff --git a/includes/DBTable.php b/includes/DBTable.php index 7d17b546bc..c85a1006b6 100644 --- a/includes/DBTable.php +++ b/includes/DBTable.php @@ -423,7 +423,7 @@ abstract class DBTable { foreach ( $this->select( null, $conditions ) as /* DBDataObject */ $item ) { $item->loadSummaryFields( $summaryFields ); $item->setSummaryMode( true ); - $item->saveExisting(); + $item->save(); } $this->setReadDb( DB_SLAVE );