- /**
- * Load up the appropriate search engine class for the currently
- * active database backend, and return a configured instance.
- *
- * @return SearchEngine
- * @access private
- */
- function &getSearchEngine() {
- global $wgDBtype, $wgDBmysql4, $wgSearchType;
- if( $wgDBtype == 'mysql' ) {
- if( $wgDBmysql4 ) {
- $class = 'SearchMySQL4';
- require_once( 'SearchMySQL4.php' );
- } else {
- $class = 'SearchMysql3';
- require_once( 'SearchMySQL3.php' );
- }
- } else {
- $class = 'SearchEngineDummy';
- }
- $search = new $class( wfGetDB( DB_SLAVE ) );
- $search->setLimitOffset( $this->limit, $this->offset );
- $search->setNamespaces( $this->namespaces );
- return $search;
- }
-