Made BloomFilterTitleHasLogs refresh odds linear to be smoother
[lhc/web/wiklou.git] / includes / cache / LinkBatch.php
index 76cc583..77e4d49 100644 (file)
@@ -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;
        }
@@ -180,16 +178,22 @@ class LinkBatch {
         * @return bool|ResultWrapper
         */
        public function doQuery() {
+               global $wgContentHandlerUseDB;
+
                if ( $this->isEmpty() ) {
                        return false;
                }
-               wfProfileIn( __METHOD__ );
 
                // This is similar to LinkHolderArray::replaceInternal
                $dbr = wfGetDB( DB_SLAVE );
                $table = 'page';
                $fields = array( 'page_id', 'page_namespace', 'page_title', 'page_len',
                        'page_is_redirect', 'page_latest' );
+
+               if ( $wgContentHandlerUseDB ) {
+                       $fields[] = 'page_content_model';
+               }
+
                $conds = $this->constructSet( 'page', $dbr );
 
                // Do query
@@ -198,7 +202,6 @@ class LinkBatch {
                        $caller .= " (for {$this->caller})";
                }
                $res = $dbr->select( $table, $fields, $conds, $caller );
-               wfProfileOut( __METHOD__ );
 
                return $res;
        }