- if ( $this->getConfig()->get( 'DisableTextSearch' ) ) {
- $searchFowardUrl = $this->getConfig()->get( 'SearchForwardUrl' );
- if ( $searchFowardUrl ) {
- $url = str_replace( '$1', urlencode( $term ), $searchFowardUrl );
- $out->redirect( $url );
- } else {
- $out->addHTML(
- Xml::openElement( 'fieldset' ) .
- Xml::element( 'legend', null, $this->msg( 'search-external' )->text() ) .
- Xml::element(
- 'p',
- [ 'class' => 'mw-searchdisabled' ],
- $this->msg( 'searchdisabled' )->text()
- ) .
- $this->msg( 'googlesearch' )->rawParams(
- htmlspecialchars( $term ),
- 'UTF-8',
- $this->msg( 'searchbutton' )->escaped()
- )->text() .
- Xml::closeElement( 'fieldset' )
- );
- }
-
+ Hooks::run( 'SpecialSearchSetupEngine', [ $this, $this->profile, $search ] );
+ if ( !Hooks::run( 'SpecialSearchResultsPrepend', [ $this, $out, $term ] ) ) {
+ # Hook requested termination