Reverting r16861; incompatible change to message texts, breaks a lot of toggle displa...
[lhc/web/wiklou.git] / includes / SpecialSearch.php
index 4cea94d..057b487 100644 (file)
@@ -23,9 +23,6 @@
  * @subpackage SpecialPage
  */
 
-/** */
-require_once( 'Revision.php' );
-
 /**
  * Entry point
  *
@@ -80,6 +77,7 @@ class SpecialSearch {
        function goResult( $term ) {
                global $wgOut;
                global $wgGoToEdit;
+               global $wgContLang;
 
                $this->setupPage( $term );
 
@@ -113,7 +111,7 @@ class SpecialSearch {
                                $editurl = $t->escapeLocalURL( 'action=edit' );
                        }
                }
-               $wgOut->addWikiText( wfMsg('nogomatch', ":$term", $term ) );
+               $wgOut->addWikiText( wfMsg( 'noexactmatch', wfEscapeWikiText( $term ) ) );
 
                return $this->showResults( $term );
        }
@@ -154,7 +152,7 @@ class SpecialSearch {
                                wfMsg( 'googlesearch',
                                        htmlspecialchars( $term ),
                                        htmlspecialchars( $wgInputEncoding ),
-                                       htmlspecialchars( wfMsg( 'search' ) )
+                                       htmlspecialchars( wfMsg( 'searchbutton' ) )
                                )
                        );
                        wfProfileOut( $fname );
@@ -224,7 +222,8 @@ class SpecialSearch {
        function setupPage( $term ) {
                global $wgOut;
                $wgOut->setPageTitle( wfMsg( 'searchresults' ) );
-               $wgOut->setSubtitle( htmlspecialchars( wfMsg( 'searchquery', $term ) ) );
+               $subtitlemsg = ( Title::newFromText($term) ? 'searchsubtitle' : 'searchsubtitleinvalid' );
+               $wgOut->setSubtitle( $wgOut->parse( wfMsg( $subtitlemsg, wfEscapeWikiText($term) ) ) );
                $wgOut->setArticleRelated( false );
                $wgOut->setRobotpolicy( 'noindex,nofollow' );
        }