Fix DatabaseSqliteTest for db changes for chunk support.
[lhc/web/wiklou.git] / includes / specials / SpecialSearch.php
index bdd7681..022744f 100644 (file)
@@ -344,7 +344,7 @@ class SpecialSearch extends SpecialPage {
                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
                        );
@@ -407,7 +407,7 @@ class SpecialSearch extends SpecialPage {
                        $this->getOutput()->addHtml( '<p></p>' );
                        return;
                }
-               $messageName = '';
+
                if( $t->isKnown() ) {
                        $messageName = 'searchmenu-exists';
                } elseif( $t->userCan( 'create' ) ) {
@@ -435,8 +435,8 @@ class SpecialSearch extends SpecialPage {
                $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' );
@@ -600,7 +600,7 @@ class SpecialSearch extends SpecialPage {
                // format text extract
                $extract = "<div class='searchresult'>".$result->getTextSnippet($terms)."</div>";
 
-               $lang = $this->getLang();
+               $lang = $this->getLanguage();
 
                // format score
                if( is_null( $result->getScore() ) ) {
@@ -1001,7 +1001,7 @@ class SpecialSearch extends SpecialPage {
                }
 
                $profiles = $this->getSearchProfiles();
-               $lang = $this->getLang();
+               $lang = $this->getLanguage();
 
                // Outputs XML for Search Types
                $out .= Xml::openElement( 'div', array( 'class' => 'search-types' ) );
@@ -1069,7 +1069,8 @@ class SpecialSearch extends SpecialPage {
         * @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',