Update various @params from DatabaseBase to IDatabase
[lhc/web/wiklou.git] / includes / cache / LinkBatch.php
index 48c063f..d98888f 100644 (file)
@@ -78,7 +78,7 @@ class LinkBatch {
                        $this->data[$ns] = array();
                }
 
-               $this->data[$ns][str_replace( ' ', '_', $dbkey )] = 1;
+               $this->data[$ns][strtr( $dbkey, ' ', '_' )] = 1;
        }
 
        /**
@@ -128,11 +128,9 @@ class LinkBatch {
         * @return array Remaining IDs
         */
        protected function executeInto( &$cache ) {
-               wfProfileIn( __METHOD__ );
                $res = $this->doQuery();
                $this->doGenderQuery();
                $ids = $this->addResultToCache( $cache, $res );
-               wfProfileOut( __METHOD__ );
 
                return $ids;
        }
@@ -185,7 +183,6 @@ class LinkBatch {
                if ( $this->isEmpty() ) {
                        return false;
                }
-               wfProfileIn( __METHOD__ );
 
                // This is similar to LinkHolderArray::replaceInternal
                $dbr = wfGetDB( DB_SLAVE );
@@ -205,7 +202,6 @@ class LinkBatch {
                        $caller .= " (for {$this->caller})";
                }
                $res = $dbr->select( $table, $fields, $conds, $caller );
-               wfProfileOut( __METHOD__ );
 
                return $res;
        }
@@ -235,7 +231,7 @@ class LinkBatch {
         * Construct a WHERE clause which will match all the given titles.
         *
         * @param string $prefix The appropriate table's field name prefix ('page', 'pl', etc)
-        * @param DatabaseBase $db DatabaseBase object to use
+        * @param IDatabase $db DatabaseBase object to use
         * @return string|bool String with SQL where clause fragment, or false if no items.
         */
        public function constructSet( $prefix, $db ) {