- function initializeSpecialCases ( &$title , &$output , $request , $action ) {
- if ( $title->getInterwiki() != '' ) {
+ function initializeSpecialCases ( &$title , &$output , $request , $action , &$search ) {
+ wfProfileIn( 'MediaWiki::initializeSpecialCases' );
+ if( !$this->getVal('DisableInternalSearch') && !is_null( $search ) && $search !== '' ) {
+ require_once( 'includes/SpecialSearch.php' );
+ $title = Title::makeTitle( NS_SPECIAL, 'Search' );
+ wfSpecialSearch();
+ } else if( !$title or $title->getDBkey() == '' ) {
+ $title = Title::newFromText( wfMsgForContent( 'badtitle' ) );
+ $output->errorpage( 'badtitle', 'badtitletext' );
+ } else if ( $title->getInterwiki() != '' ) {