r95217 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95216‎ | r95217 | r95218 >
Date:18:26, 22 August 2011
Author:preilly
Status:ok
Tags:
Comment:
fix issue with unexpected HTTP failure status code received on it.wikipedia.org
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.php (modified) (history)
  • /trunk/extensions/MobileFrontend/views/layout/_footmenu_default.html.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.php
@@ -65,7 +65,7 @@
6666 );
6767
6868 class ExtMobileFrontend {
69 - const VERSION = '0.5.42';
 69+ const VERSION = '0.5.43';
7070
7171 /**
7272 * @var DOMDocument
@@ -98,6 +98,8 @@
9999 public static $enableImages;
100100 public static $isMainPage = false;
101101 public static $searchField;
 102+ public static $disableImagesURL;
 103+ public static $enableImagesURL;
102104
103105 public $itemsToRemove = array(
104106 '#contentSub', # redirection notice
@@ -145,7 +147,10 @@
146148 }
147149
148150 public function getMsg() {
149 - global $wgUser, $wgContLang;
 151+ global $wgUser, $wgContLang, $wgRequest;
 152+
 153+ self::$disableImagesURL = $wgRequest->escapeAppendQuery( 'disableImages=1' );
 154+ self::$enableImagesURL = $wgRequest->escapeAppendQuery( 'enableImages=1' );
150155 $skin = $wgUser->getSkin();
151156 $copyright = $skin->getCopyright();
152157 // Need to stash the results of the "wfMsg" call before the Output Buffering handler
Index: trunk/extensions/MobileFrontend/views/layout/_footmenu_default.html.php
@@ -8,10 +8,10 @@
99
1010 if ( self::$disableImages == 0 ) {
1111 $imagesToggle = $disableImages;
12 - $imagesURL = '?disableImages=1';
 12+ $imagesURL = self::$disableImagesURL;
1313 } else {
1414 $imagesToggle = $enableImages;
15 - $imagesURL = '?enableImages=1';
 15+ $imagesURL = self::$enableImagesURL;
1616 }
1717
1818 $footerHtml = <<<EOD

Follow-up revisions

RevisionCommit summaryAuthorDate
r95218mft r95217preilly18:28, 22 August 2011

Status & tagging log