r99819 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99818‎ | r99819 | r99820 >
Date:22:01, 14 October 2011
Author:preilly
Status:ok (Comments)
Tags:
Comment:
fix for bug 31710 - ios app show both native and mobile web search input fields
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.php (modified) (history)
  • /trunk/extensions/MobileFrontend/views/layout/_search_webkit.html.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.php
@@ -128,6 +128,7 @@
129129 public static $leaveFeedbackURL;
130130 public static $mobileRedirectFormAction;
131131 public static $isBetaGroupMember = false;
 132+ public static $hideSearchBox = false;
132133
133134 public static $messageKeys = array(
134135 'mobile-frontend-show-button',
@@ -556,6 +557,12 @@
557558
558559 private function checkUserStatus() {
559560 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+
560567 $optInCookie = $this->getOptInOutCookie();
561568 if ( !empty( $optInCookie ) &&
562569 $optInCookie == 1 ) {
Index: trunk/extensions/MobileFrontend/views/layout/_search_webkit.html.php
@@ -9,11 +9,14 @@
1010
1111 $scriptUrl = wfScript();
1212
 13+if (self::$hideSearchBox)
 14+$searchBoxDisplayNone = ' style="display: none;" ';
 15+
1316 $searchWebkitHtml = <<<EOD
1417 <div id='header'>
1518 <div id='searchbox'>
1619 <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}>
1821 <input type="hidden" value="Special:Search" name="title" />
1922 <div id="sq" class="divclearable">
2023 <input type="text" name="search" id="search" size="22" value="{$searchField}" />

Follow-up revisions

RevisionCommit summaryAuthorDate
r99820fix for bug 31710 - ios app show both native and mobile web search input fieldspreilly22:04, 14 October 2011
r99821fix for bug 31710 - ios app show both native and mobile web search input fieldspreilly22:07, 14 October 2011
r99823mft r99822 r99819preilly22:16, 14 October 2011
r99824mft r99822 r99819preilly22:17, 14 October 2011

Comments

#Comment by Preilly (talk | contribs)   22:05, 14 October 2011

The formatting has been fixed now in r99820.

#Comment by G.Hagedorn (talk | contribs)   08:11, 16 October 2011

tag for 1.18?

Status & tagging log