&$query_options: array of options for the database request
&$select: Array of columns to select
+'SpecialSearchCreateLink': called when making the message to create a page or
+go to the existing page
+$t: title object searched for
+&$params: an array of the default message name and page title (as parameter)
+
'SpecialSearchGo': called when user clicked the "Go"
&$title: title object generated from the text entered by the user
&$term: the search term entered by the user
target doesn't exist
&$title: title object generated from the text entered by the user
+'SpecialSearchPowerBox': the equivalent of SpecialSearchProfileForm for
+the advanced form, a.k.a. power search box
+&$showSections: an array to add values with more options to
+$term: the search term (not a title object)
+$opts: an array of hidden options (containing 'redirs' and 'profile')
+
'SpecialSearchProfiles': allows modification of search profiles
&$profiles: profiles, which can be modified.
$messageName = 'searchmenu-new-nocreate';
}
}
+ $params = array( $messageName, wfEscapeWikiText( $t->getPrefixedText() ) );
+ wfRunHooks( 'SpecialSearchCreateLink', array( $t, &$params ) );
+
if( $messageName ) {
- $this->getOutput()->wrapWikiMsg( "<p class=\"mw-search-createlink\">\n$1</p>", array( $messageName, wfEscapeWikiText( $t->getPrefixedText() ) ) );
+ $this->getOutput()->wrapWikiMsg( "<p class=\"mw-search-createlink\">\n$1</p>", $params );
} else {
// preserve the paragraph for margins etc...
$this->getOutput()->addHtml( '<p></p>' );
}
$namespaceTables .= Xml::closeElement( 'table' );
}
+
+ $showSections = array( 'namespaceTables' => $namespaceTables );
+
// Show redirects check only if backend supports it
- $redirects = '';
if( $this->getSearchEngine()->supports( 'list-redirects' ) ) {
- $redirects =
+ $showSections['redirects'] =
Xml::checkLabel( wfMsg( 'powersearch-redir' ), 'redirs', 'redirs', $this->searchRedirects );
}
+ wfRunHooks( 'SpecialSearchPowerBox', array( &$showSections, $term, $opts ) );
+
$hidden = '';
unset( $opts['redirs'] );
foreach( $opts as $key => $value ) {
)
) .
Xml::element( 'div', array( 'class' => 'divider' ), '', false ) .
- $namespaceTables .
- Xml::element( 'div', array( 'class' => 'divider' ), '', false ) .
- $redirects . $hidden .
+ implode( Xml::element( 'div', array( 'class' => 'divider' ), '', false ), $showSections ) .
+ $hidden .
Xml::closeElement( 'fieldset' );
}