r94785 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94784‎ | r94785 | r94786 >
Date:17:59, 17 August 2011
Author:preilly
Status:ok
Tags:
Comment:
removed use of _GET directly
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
@@ -55,7 +55,7 @@
5656 $wgMFRemovableClasses = array();
5757
5858 class ExtMobileFrontend {
59 - const VERSION = '0.5.32';
 59+ const VERSION = '0.5.33';
6060
6161 /**
6262 * @var DOMDocument
@@ -87,6 +87,7 @@
8888 public static $disableImages;
8989 public static $enableImages;
9090 public static $isMainPage = false;
 91+ public static $searchField;
9192
9293 public $itemsToRemove = array(
9394 '#contentSub', # redirection notice
@@ -257,6 +258,7 @@
258259 self::$requestedSegment = $wgRequest->getText( 'seg', 0 );
259260 self::$search = $wgRequest->getText( 'search' );
260261 self::$callback = $wgRequest->getText( 'callback' );
 262+ self::$searchField = $wgRequest->getText( 'search', '' );
261263
262264 $acceptHeader = $_SERVER["HTTP_ACCEPT"];
263265 $device = new DeviceDetection();
Index: trunk/extensions/MobileFrontend/views/layout/_search_webkit.html.php
@@ -1,8 +1,7 @@
22 <?php
33 global $wgExtensionAssetsPath;
44
5 -$searchField = (!empty($_GET['search'])) ? $_GET['search'] : '';
6 -
 5+$searchField = self::$searchField;
76 $mainPageUrl = self::$mainPageUrl;
87 $randomPageUrl = self::$randomPageUrl;
98 $homeButton = self::$messages['mobile-frontend-home-button'];

Follow-up revisions

RevisionCommit summaryAuthorDate
r94786mft r94785preilly18:00, 17 August 2011

Status & tagging log