Cleanup r34661 (bug 14063 -- <label> for powersearch redirect checkbox)
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 13 May 2008 18:59:18 +0000 (18:59 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 13 May 2008 18:59:18 +0000 (18:59 +0000)
Got rid of the old weird messages that combined localization with layout. Layout's now in nice clean code, with localization in nice clean messages. Yay!

includes/SpecialSearch.php
languages/messages/MessagesEn.php

index add46da..c0b143f 100644 (file)
@@ -593,21 +593,27 @@ class SpecialSearch {
                }
 
                $redirect = Xml::check( 'redirs', $this->searchRedirects, array( 'value' => '1', 'id' => 'redirs' ) );
-               $redirectLabel = Xml::label( wfMsg( 'powersearchtext-redir' ), 'redirs' );
+               $redirectLabel = Xml::label( wfMsg( 'powersearch-redir' ), 'redirs' );
                $searchField = Xml::input( 'search', 50, $term, array( 'type' => 'text', 'id' => 'powerSearchText' ) );
                $searchButton = Xml::submitButton( wfMsg( 'powersearch' ), array( 'name' => 'fulltext' ) ) . "\n";
 
                $out = Xml::openElement( 'form', array( 'id' => 'powersearch', 'method' => 'get', 'action' => $wgScript ) ) .
-                       Xml::openElement( 'fieldset' ) .
-                       Xml::element( 'legend', array( ), wfMsg( 'powersearch-legend' ) ) .
-                       Xml::hidden( 'title', 'Special:Search' ) .
-                       wfMsgExt( 'powersearchtext-ns', array( 'parse', 'replaceafter' ), $namespaces) .
-                       Xml::openElement( 'p' ) .
-                       $redirect . " " . $redirectLabel .
-                       Xml::closeElement( 'p') .
-                       wfMsgExt( 'powersearchtext-field', array( 'parse', 'replaceafter' ), $searchField, $searchButton) .
-                       Xml::closeElement( 'fieldset' ) .
-                       Xml::closeElement( 'form' );
+                       Xml::fieldset( wfMsg( 'powersearch-legend' ),
+                               Xml::hidden( 'title', 'Special:Search' ) .
+                               "<p>" .
+                               wfMsgExt( 'powersearch-ns', array( 'parseinline' ) ) .
+                               "<br />" .
+                               $namespaces .
+                               "</p>" .
+                               "<p>" .
+                               $redirect . " " . $redirectLabel .
+                               "</p>" .
+                               wfMsgExt( 'powersearch-field', array( 'parseinline' ) ) .
+                               "&nbsp;" .
+                               $searchField .
+                               "&nbsp;" .
+                               $searchButton ) .
+                       "</form>";
 
                return $out;
        }
index adc5ff5..20d91a7 100644 (file)
@@ -1318,9 +1318,9 @@ You can [[:\$1|create this page]].",
 'nonefound'                 => "'''Note''': Only some namespaces are searched by default. Try prefixing your query with ''all:'' to search all content (including talk pages, templates, etc), or use the desired namespace as prefix.",
 'powersearch'               => 'Advanced search',
 'powersearch-legend'        => 'Advanced search',
-'powersearchtext-ns'        => 'Search in namespaces:<br />$1<br />',
-'powersearchtext-redir'     => 'List redirects',
-'powersearchtext-field'     => 'Search for $1 $2',
+'powersearch-ns'            => 'Search in namespaces:',
+'powersearch-redir'         => 'List redirects',
+'powersearch-field'         => 'Search for',
 'search-external'           => 'External search',
 'searchdisabled'            => '{{SITENAME}} search is disabled.
 You can search via Google in the meantime.