Index: trunk/extensions/MobileFrontend/MobileFrontend.php |
— | — | @@ -128,6 +128,7 @@ |
129 | 129 | public static $leaveFeedbackURL; |
130 | 130 | public static $mobileRedirectFormAction; |
131 | 131 | public static $isBetaGroupMember = false; |
| 132 | + public static $hideSearchBox = false; |
132 | 133 | |
133 | 134 | public static $messageKeys = array( |
134 | 135 | 'mobile-frontend-show-button', |
— | — | @@ -556,6 +557,12 @@ |
557 | 558 | |
558 | 559 | private function checkUserStatus() { |
559 | 560 | wfProfileIn( __METHOD__ ); |
| 561 | + |
| 562 | + if ( !empty( $_SERVER['HTTP_APPLICATION_VERSION'] ) && |
| 563 | + strpos( $_SERVER['HTTP_APPLICATION_VERSION'], 'Wikipedia Mobile' ) !== false ) { |
| 564 | + self::$hideSearchBox = true; |
| 565 | + } |
| 566 | + |
560 | 567 | $optInCookie = $this->getOptInOutCookie(); |
561 | 568 | if ( !empty( $optInCookie ) && |
562 | 569 | $optInCookie == 1 ) { |
Index: trunk/extensions/MobileFrontend/views/layout/_search_webkit.html.php |
— | — | @@ -9,11 +9,14 @@ |
10 | 10 | |
11 | 11 | $scriptUrl = wfScript(); |
12 | 12 | |
| 13 | +if (self::$hideSearchBox) |
| 14 | +$searchBoxDisplayNone = ' style="display: none;" '; |
| 15 | + |
13 | 16 | $searchWebkitHtml = <<<EOD |
14 | 17 | <div id='header'> |
15 | 18 | <div id='searchbox'> |
16 | 19 | <img width="35" height="22" alt='Logo' id='logo' src='{$wgMobileFrontendLogo}' /> |
17 | | - <form action='{$scriptUrl}' class='search_bar' method='get'> |
| 20 | + <form action='{$scriptUrl}' class='search_bar' method='get' {$searchBoxDisplayNone}> |
18 | 21 | <input type="hidden" value="Special:Search" name="title" /> |
19 | 22 | <div id="sq" class="divclearable"> |
20 | 23 | <input type="text" name="search" id="search" size="22" value="{$searchField}" /> |