r106391 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106390‎ | r106391 | r106392 >
Date:23:26, 15 December 2011
Author:preilly
Status:resolved (Comments)
Tags:
Comment:
add hide logo and searchbox options to querystring
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.php
@@ -688,7 +688,20 @@
689689 }
690690
691691 private function checkUserStatus() {
 692+ global $wgRequest;
692693 wfProfileIn( __METHOD__ );
 694+
 695+ $hideSearchBox = $wgRequest->getText( 'hidesearchbox' );
 696+
 697+ if ( $hideSearchBox && $hideSearchBox == 1 ) {
 698+ self::$hideSearchBox = true;
 699+ }
 700+
 701+ $hideLogo = $wgRequest->getText( 'hidelogo' );
 702+
 703+ if ( $hideLogo && $hideLogo == 1 ) {
 704+ self::$hideLogo = true;
 705+ }
693706
694707 if ( !empty( $_SERVER['HTTP_APPLICATION_VERSION'] ) &&
695708 strpos( $_SERVER['HTTP_APPLICATION_VERSION'], 'Wikipedia Mobile' ) !== false ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r106464fix for r106392 and r106391preilly19:15, 16 December 2011
r106466fix for r106391preilly19:24, 16 December 2011

Comments

#Comment by Nikerabbit (talk | contribs)   10:28, 16 December 2011
+		if ( $hideSearchBox && $hideSearchBox == 1 ) {

Makes no sense. Do you want to use $wgRequest->getCheck() instead?

Status & tagging log