https://bugzilla.wikimedia.org/show_bug.cgi?id=53982

--- Comment #1 from Sam Reed (reedy) <s...@reedyboy.net> ---


    public function getSearchEngine() {
        if ( $this->searchEngine === null ) {
            $this->searchEngine = $this->searchEngineType ?
                SearchEngine::create( $this->searchEngineType ) :
SearchEngine::create();
        }
        return $this->searchEngine;
    }

------------

    public static function create( $type = null ) {
        global $wgSearchType;
        $dbr = null;

        $alternatives = self::getSearchTypes();
        $type = $type !== null ? $type : $wgSearchType;
        if ( $type && in_array( $type, $alternatives ) ) {
            $class = $type;
        } else {
            $dbr = wfGetDB( DB_SLAVE );
            $class = $dbr->getSearchEngine();
        }
        $search = new $class( $dbr );
        $search->setLimitOffset( 0, 0 );
        return $search;
    }

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to