fix call to protected method and killed dead code
authorJeroen De Dauw <jeroendedauw@users.mediawiki.org>
Wed, 15 Feb 2012 14:47:25 +0000 (14:47 +0000)
committerJeroen De Dauw <jeroendedauw@users.mediawiki.org>
Wed, 15 Feb 2012 14:47:25 +0000 (14:47 +0000)
includes/DBDataObject.php
includes/DBTable.php

index 3fa5285..791f377 100644 (file)
@@ -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).
         *
index 7d17b54..c85a100 100644 (file)
@@ -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 );