if( $num || $this->offset ) {
// Show the create link ahead
$this->showCreateLink( $t );
- $prevnext = $this->getLang()->viewPrevNext( $this->getTitle(), $this->offset, $this->limit,
+ $prevnext = $this->getLanguage()->viewPrevNext( $this->getTitle(), $this->offset, $this->limit,
$this->powerSearchOptions() + array( 'search' => $term ),
max( $titleMatchesNum, $textMatchesNum ) < $this->limit
);
$this->getOutput()->addHtml( '<p></p>' );
return;
}
- $messageName = '';
+
if( $t->isKnown() ) {
$messageName = 'searchmenu-exists';
} elseif( $t->userCan( 'create' ) ) {
$this->searchAdvanced = ($this->profile === 'advanced');
$out = $this->getOutput();
if( strval( $term ) !== '' ) {
- $out->setPageTitle( wfMsg( 'searchresults') );
- $out->setHTMLTitle( wfMsg( 'pagetitle', wfMsg( 'searchresults-title', $term ) ) );
+ $out->setPageTitle( $this->msg( 'searchresults' ) );
+ $out->setHTMLTitle( $this->msg( 'pagetitle', $this->msg( 'searchresults-title', $term )->plain() ) );
}
// add javascript specific to special:search
$out->addModules( 'mediawiki.special.search' );
// format text extract
$extract = "<div class='searchresult'>".$result->getTextSnippet($terms)."</div>";
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
// format score
if( is_null( $result->getScore() ) ) {
}
$profiles = $this->getSearchProfiles();
- $lang = $this->getLang();
+ $lang = $this->getLanguage();
// Outputs XML for Search Types
$out .= Xml::openElement( 'div', array( 'class' => 'search-types' ) );
* @return string
*/
protected function shortDialog( $term ) {
- $out = Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . "\n";
+ $out = Html::hidden( 'title', $this->getTitle()->getPrefixedText() );
+ $out .= Html::hidden( 'profile', $this->profile ) . "\n";
// Term box
$out .= Html::input( 'search', $term, 'search', array(
'id' => $this->profile === 'advanced' ? 'powerSearchText' : 'searchText',