r114213 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114212‎ | r114213 | r114214 >
Date:23:25, 19 March 2012
Author:awjrichards
Status:reverted
Tags:
Comment:
Modified paths:
  • /branches/wmf/1.19wmf1/extensions/MobileFrontend (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.body.php (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.php (modified) (history)
  • /branches/wmf/1.19wmf1/extensions/MobileFrontend/templates/ApplicationTemplate.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.body.php
@@ -1502,6 +1502,11 @@
15031503 return $expiry;
15041504 }
15051505
 1506+ public function getCacheVaryCookies( $out, &$cookies ) {
 1507+ global $wgCookiePrefix;
 1508+ $cookies[] = $wgCookiePrefix . 'mf_useformat';
 1509+ }
 1510+
15061511 /**
15071512 * Determine the duration the cookie should last.
15081513 *
Index: branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.php
@@ -120,6 +120,8 @@
121121 */
122122 $wgMobileRedirectFormAction = false;
123123
 124+$wgMobileResourceVersion;
 125+
124126 $wgExtMobileFrontend = null;
125127
126128 $wgExtensionFunctions[] = 'efMobileFrontend_Setup';
@@ -132,6 +134,7 @@
133135 $wgHooks['APIGetParamDescription'][] = 'ApiParseExtender::onAPIGetParamDescription';
134136 $wgHooks['APIGetDescription'][] = 'ApiParseExtender::onAPIGetDescription';
135137
 138+
136139 function efMobileFrontend_Setup() {
137140 global $wgExtMobileFrontend, $wgHooks;
138141 $wgExtMobileFrontend = new ExtMobileFrontend();
@@ -140,6 +143,7 @@
141144 $wgHooks['SkinTemplateOutputPageBeforeExec'][] = array( &$wgExtMobileFrontend, 'addMobileFooter' );
142145 $wgHooks['TestCanonicalRedirect'][] = array( &$wgExtMobileFrontend, 'testCanonicalRedirect' );
143146 $wgHooks['ResourceLoaderTestModules'][] = array( &$wgExtMobileFrontend, 'addTestModules' );
 147+ $wgHooks['GetCacheVaryCookies'][] = array( &$wgExtMobileFrontend, 'getCacheVaryCookies' );
144148 }
145149
146150 /**
Index: branches/wmf/1.19wmf1/extensions/MobileFrontend/templates/ApplicationTemplate.php
@@ -7,7 +7,7 @@
88 class ApplicationTemplate extends MobileFrontendTemplate {
99
1010 public function getHTML() {
11 -
 11+ global $wgMobileResourceVersion;
1212 if ( $this->data['wgAppleTouchIcon'] !== false ) {
1313 $appleTouchIconTag = Html::element( 'link', array( 'rel' => 'apple-touch-icon', 'href' => $this->data['wgAppleTouchIcon'] ) );
1414 } else {
@@ -36,7 +36,7 @@
3737
3838 $jQuerySupport = $this->data['device']['supports_jquery'];
3939 $jQueryScript = $jQuerySupport ? $startScriptTag . $javaScriptPath . 'jquery-1.7.1.min.js' . $endScriptTag : '';
40 - $filePageScript = ( $this->data['isFilePage'] ) ? $startScriptTag . $javaScriptPath . 'filepage.js?version=1332193250' . $endScriptTag : '';
 40+ $filePageScript = ( $this->data['isFilePage'] ) ? $startScriptTag . $javaScriptPath . 'filepage.js?version=' . $wgMobileResourceVersion . $endScriptTag : '';
4141
4242 $startLinkTag = "<link href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/";
4343 $endLinkTag = "' media='all' rel='Stylesheet' type='text/css' />";
@@ -59,7 +59,7 @@
6060
6161 if( $this->data['isBetaGroupMember'] && $jQuerySupport ) {
6262 $betajs = <<<HTML
63 - {$startScriptTag}{$javaScriptPath}references.{$resourceSuffix}js?version=1332193250{$endScriptTag}
 63+ {$startScriptTag}{$javaScriptPath}references.{$resourceSuffix}js?version={$wgMobileResourceVersion}{$endScriptTag}
6464 HTML;
6565 } else {
6666 $betajs = "";
@@ -71,8 +71,8 @@
7272 <head>
7373 <title>{$this->data['htmlTitle']}</title>
7474 <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
75 - <link href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/{$betaPrefix}common.css?version=1332193250' media='all' rel='Stylesheet' type='text/css' />
76 - <link href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/{$cssFileName}.css?version=1332193250' media='all' rel='Stylesheet' type='text/css' />
 75+ <link href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/{$betaPrefix}common.css?version={$wgMobileResourceVersion}' media='all' rel='Stylesheet' type='text/css' />
 76+ <link href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/{$cssFileName}.css?version={$wgMobileResourceVersion}' media='all' rel='Stylesheet' type='text/css' />
7777 {$filePageStyle}
7878 <meta name="viewport" content="initial-scale=1.0">
7979 {$appleTouchIconTag}
@@ -90,10 +90,10 @@
9191 </div>
9292 {$this->data['footerHtml']}
9393 <!--[if gt IE 9]><!-->
94 - {$startScriptTag}{$javaScriptPath}application.{$resourceSuffix}js?version=1332193250{$endScriptTag}
95 - {$startScriptTag}{$javaScriptPath}toggle.{$resourceSuffix}js?version=1332193250{$endScriptTag}
96 - {$startScriptTag}{$javaScriptPath}banner.{$resourceSuffix}js?version=1332193250{$endScriptTag}
97 - {$startScriptTag}{$javaScriptPath}{$betaPrefix}opensearch.{$resourceSuffix}js?version=1332193250{$endScriptTag}
 94+ {$startScriptTag}{$javaScriptPath}application.{$resourceSuffix}js?version={$wgMobileResourceVersion}{$endScriptTag}
 95+ {$startScriptTag}{$javaScriptPath}toggle.{$resourceSuffix}js?version={$wgMobileResourceVersion}{$endScriptTag}
 96+ {$startScriptTag}{$javaScriptPath}banner.{$resourceSuffix}js?version={$wgMobileResourceVersion}{$endScriptTag}
 97+ {$startScriptTag}{$javaScriptPath}{$betaPrefix}opensearch.{$resourceSuffix}js?version={$wgMobileResourceVersion}{$endScriptTag}
9898 {$betajs}
9999 {$filePageScript}
100100 <!--[endif]-->
Property changes on: branches/wmf/1.19wmf1/extensions/MobileFrontend
___________________________________________________________________
Modified: svn:mergeinfo
101101 Merged /trunk/extensions/MobileFrontend:r114211-114212

Follow-up revisions

RevisionCommit summaryAuthorDate
r114223Revert r114221,r114216,r114213,r114207,r114206,r114205,r114203,r114202,r11420...awjrichards00:26, 20 March 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r114211Added invocation of GetCacheVaryCookies hook to ad 'mf_useformat' cookie to x...awjrichards23:19, 19 March 2012
r114212Finishing implementation of accidentally checked in in previous commitawjrichards23:21, 19 March 2012

Status & tagging log