}
$out = $this->getOutput();
+ $widgetOptions = $this->getConfig()->get( 'SpecialSearchFormOptions' );
$formWidget = new MediaWiki\Widget\Search\SearchFormWidget(
$this,
$this->searchConfig,
// only do the form render here for the empty $term case. Rendering
// the form when a search is provided is repeated below.
$out->addHTML( $formWidget->render(
- $this->profile, $term, 0, 0, $this->offset, $this->isPowerSearch()
+ $this->profile, $term, 0, 0, $this->offset, $this->isPowerSearch(), $widgetOptions
) );
return;
}
// start rendering the page
$out->enableOOUI();
$out->addHTML( $formWidget->render(
- $this->profile, $term, $num, $totalRes, $this->offset, $this->isPowerSearch()
+ $this->profile, $term, $num, $totalRes, $this->offset, $this->isPowerSearch(), $widgetOptions
) );
// did you mean... suggestions
) {
// Reset namespace preferences: namespaces are not searched
// when they're not mentioned in the URL parameters.
- foreach ( MWNamespace::getValidNamespaces() as $n ) {
+ foreach ( MediaWikiServices::getInstance()->getNamespaceInfo()->getValidNamespaces()
+ as $n
+ ) {
$user->setOption( 'searchNs' . $n, false );
}
// The request parameters include all the namespaces to be searched.