r103099 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103098‎ | r103099 | r103100 >
Date:00:46, 15 November 2011
Author:preilly
Status:deferred
Tags:
Comment:
1.18wmf1: MFT r103097
Modified paths:
  • /branches/wmf/1.18wmf1/extensions/MobileFrontend/MobileFrontend.php (modified) (history)
  • /branches/wmf/1.18wmf1/extensions/MobileFrontend/views/layout/_search_webkit.html.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/extensions/MobileFrontend/MobileFrontend.php
@@ -82,6 +82,7 @@
8383 */
8484 function efExtMobileFrontendUnitTests( &$files ) {
8585 $files[] = dirname( __FILE__ ) . '/tests/MobileFrontendTest.php';
 86+ $files[] = dirname( __FILE__ ) . '/tests/DeviceDetectionTest.php';
8687 return true;
8788 }
8889
@@ -126,6 +127,7 @@
127128 public static $mobileRedirectFormAction;
128129 public static $isBetaGroupMember = false;
129130 public static $hideSearchBox = false;
 131+ public static $hideLogo = false;
130132 public static $languageUrls;
131133
132134 public static $messageKeys = array(
@@ -601,6 +603,9 @@
602604 if ( !empty( $_SERVER['HTTP_APPLICATION_VERSION'] ) &&
603605 strpos( $_SERVER['HTTP_APPLICATION_VERSION'], 'Wikipedia Mobile' ) !== false ) {
604606 self::$hideSearchBox = true;
 607+ if (strpos( $_SERVER['HTTP_APPLICATION_VERSION'], 'Android' ) !== false ) {
 608+ self::$hideLogo = true;
 609+ }
605610 }
606611
607612 $optInCookie = $this->getOptInOutCookie();
Index: branches/wmf/1.18wmf1/extensions/MobileFrontend/views/layout/_search_webkit.html.php
@@ -10,6 +10,8 @@
1111 $scriptUrl = wfScript();
1212 $searchBoxDisplayNone = ( self::$hideSearchBox ) ? ' style="display: none;" ' : '';
1313
 14+$logoDisplayNone = ( self::$hideLogo ) ? ' style="display: none;" ' : '';
 15+
1416 $openSearchResults = '<div id="results"></div>';
1517
1618 $languageSelection = self::buildLanguageSelection() . '<br/>';
@@ -21,7 +23,7 @@
2224 $searchWebkitHtml = <<<EOD
2325 <div id='header'>
2426 <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} />
2628 <form action='{$scriptUrl}' class='search_bar' method='get' {$searchBoxDisplayNone}>
2729 <input type="hidden" value="Special:Search" name="title" />
2830 <div id="sq" class="divclearable">

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r103097hide logo on android applicationpreilly00:44, 15 November 2011

Status & tagging log