Index: branches/wmf/1.18wmf1/extensions/MobileFrontend/MobileFrontend.php |
— | — | @@ -82,6 +82,7 @@ |
83 | 83 | */ |
84 | 84 | function efExtMobileFrontendUnitTests( &$files ) { |
85 | 85 | $files[] = dirname( __FILE__ ) . '/tests/MobileFrontendTest.php'; |
| 86 | + $files[] = dirname( __FILE__ ) . '/tests/DeviceDetectionTest.php'; |
86 | 87 | return true; |
87 | 88 | } |
88 | 89 | |
— | — | @@ -126,6 +127,7 @@ |
127 | 128 | public static $mobileRedirectFormAction; |
128 | 129 | public static $isBetaGroupMember = false; |
129 | 130 | public static $hideSearchBox = false; |
| 131 | + public static $hideLogo = false; |
130 | 132 | public static $languageUrls; |
131 | 133 | |
132 | 134 | public static $messageKeys = array( |
— | — | @@ -601,6 +603,9 @@ |
602 | 604 | if ( !empty( $_SERVER['HTTP_APPLICATION_VERSION'] ) && |
603 | 605 | strpos( $_SERVER['HTTP_APPLICATION_VERSION'], 'Wikipedia Mobile' ) !== false ) { |
604 | 606 | self::$hideSearchBox = true; |
| 607 | + if (strpos( $_SERVER['HTTP_APPLICATION_VERSION'], 'Android' ) !== false ) { |
| 608 | + self::$hideLogo = true; |
| 609 | + } |
605 | 610 | } |
606 | 611 | |
607 | 612 | $optInCookie = $this->getOptInOutCookie(); |
Index: branches/wmf/1.18wmf1/extensions/MobileFrontend/views/layout/_search_webkit.html.php |
— | — | @@ -10,6 +10,8 @@ |
11 | 11 | $scriptUrl = wfScript(); |
12 | 12 | $searchBoxDisplayNone = ( self::$hideSearchBox ) ? ' style="display: none;" ' : ''; |
13 | 13 | |
| 14 | +$logoDisplayNone = ( self::$hideLogo ) ? ' style="display: none;" ' : ''; |
| 15 | + |
14 | 16 | $openSearchResults = '<div id="results"></div>'; |
15 | 17 | |
16 | 18 | $languageSelection = self::buildLanguageSelection() . '<br/>'; |
— | — | @@ -21,7 +23,7 @@ |
22 | 24 | $searchWebkitHtml = <<<EOD |
23 | 25 | <div id='header'> |
24 | 26 | <div id='searchbox'> |
25 | | - <img width="35" height="22" alt='Logo' id='logo' src='{$wgMobileFrontendLogo}' {$logoOnClick} /> |
| 27 | + <img width="35" height="22" alt='Logo' id='logo' src='{$wgMobileFrontendLogo}' {$logoOnClick} {$logoDisplayNone} /> |
26 | 28 | <form action='{$scriptUrl}' class='search_bar' method='get' {$searchBoxDisplayNone}> |
27 | 29 | <input type="hidden" value="Special:Search" name="title" /> |
28 | 30 | <div id="sq" class="divclearable"> |