Remove unused $entryPoint from Preferences::tryFormSubmit
[lhc/web/wiklou.git] / skins / Vector.php
index 0dcfe46..adf9003 100644 (file)
@@ -429,21 +429,24 @@ class VectorTemplate extends BaseTemplate {
        <h3<?php $this->html( 'userlangattributes' ) ?>><label for="searchInput"><?php $this->msg( 'search' ) ?></label></h3>
        <form action="<?php $this->text( 'wgScript' ) ?>" id="searchform">
                <?php if ( $wgVectorUseSimpleSearch && $this->getSkin()->getUser()->getOption( 'vector-simplesearch' ) ) { ?>
-               <div id="simpleSearch">
-                       <?php if ( $this->data['rtl'] ) { ?>
-                       <?php echo $this->makeSearchButton( 'image', array( 'id' => 'searchButton', 'src' => $this->getSkin()->getSkinStylePath( 'images/search-rtl.png' ), 'width' => '12', 'height' => '13' ) ); ?>
-                       <?php } ?>
-                       <?php echo $this->makeSearchInput( array( 'id' => 'searchInput', 'type' => 'text' ) ); ?>
-                       <?php if ( !$this->data['rtl'] ) { ?>
-                       <?php echo $this->makeSearchButton( 'image', array( 'id' => 'searchButton', 'src' => $this->getSkin()->getSkinStylePath( 'images/search-ltr.png' ), 'width' => '12', 'height' => '13' ) ); ?>
-                       <?php } ?>
+                       <div id="simpleSearch">
                <?php } else { ?>
-               <div>
-                       <?php echo $this->makeSearchInput( array( 'id' => 'searchInput' ) ); ?>
-                       <?php echo $this->makeSearchButton( 'go', array( 'id' => 'searchGoButton', 'class' => 'searchButton' ) ); ?>
-                       <?php echo $this->makeSearchButton( 'fulltext', array( 'id' => 'mw-searchButton', 'class' => 'searchButton' ) ); ?>
+                       <div>
                <?php } ?>
-                       <input type='hidden' name="title" value="<?php $this->text( 'searchtitle' ) ?>"/>
+                       <?php
+                       echo $this->makeSearchInput( array( 'id' => 'searchInput' ) );
+                       echo Html::hidden( 'title', $this->get( 'searchtitle' ) );
+                       // We construct two buttons (for 'go' and 'fulltext' search modes), but only one will be
+                       // visible and actionable at a time (they are overlaid on top of each other in CSS).
+                       // * Browsers will use the 'fulltext' one by default (as it's the first in tree-order), which
+                       //   is desirable when they are unable to show search suggestions (either due to being broken
+                       //   or having JavaScript turned off).
+                       // * The mediawiki.searchSuggest module, after doing tests for the broken browsers, removes
+                       //   the 'fulltext' button and handles 'fulltext' search itself; this will reveal the 'go'
+                       //   button and cause it to be used.
+                       echo $this->makeSearchButton( 'fulltext', array( 'id' => 'mw-searchButton', 'class' => 'searchButton' ) );
+                       echo $this->makeSearchButton( 'go', array( 'id' => 'searchButton', 'class' => 'searchButton' ) );
+                       ?>
                </div>
        </form>
 </div>