https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114213
Revision: 114213
Author: awjrichards
Date: 2012-03-19 23:25:18 +0000 (Mon, 19 Mar 2012)
Log Message:
-----------
MFT r114211, r114212
Modified Paths:
--------------
branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.body.php
branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.php
branches/wmf/1.19wmf1/extensions/MobileFrontend/templates/ApplicationTemplate.php
Property Changed:
----------------
branches/wmf/1.19wmf1/extensions/MobileFrontend/
Property changes on: branches/wmf/1.19wmf1/extensions/MobileFrontend
___________________________________________________________________
Modified: svn:mergeinfo
-
/trunk/extensions/MobileFrontend:99727,113463,113465-113466,113469-113472,113486,113488,113512,113553,113640,113642,113644-113645,113685,113693,113695,113714,113720-113721,113726,113730,113769-113771,113778,113807,113831-113832,113865-113866,113870-113872,113876,113880-113883,113885,113887,113897-113901,113930,113942,113971,113987,114005,114025,114100,114134,114136,114144-114145,114150,114152,114157,114177,114184,114190-114191,114193
+
/trunk/extensions/MobileFrontend:99727,113463,113465-113466,113469-113472,113486,113488,113512,113553,113640,113642,113644-113645,113685,113693,113695,113714,113720-113721,113726,113730,113769-113771,113778,113807,113831-113832,113865-113866,113870-113872,113876,113880-113883,113885,113887,113897-113901,113930,113942,113971,113987,114005,114025,114100,114134,114136,114144-114145,114150,114152,114157,114177,114184,114190-114191,114193,114211-114212
Modified:
branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.body.php
===================================================================
--- branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.body.php
2012-03-19 23:21:58 UTC (rev 114212)
+++ branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.body.php
2012-03-19 23:25:18 UTC (rev 114213)
@@ -1502,6 +1502,11 @@
return $expiry;
}
+ public function getCacheVaryCookies( $out, &$cookies ) {
+ global $wgCookiePrefix;
+ $cookies[] = $wgCookiePrefix . 'mf_useformat';
+ }
+
/**
* Determine the duration the cookie should last.
*
Modified: branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.php
===================================================================
--- branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.php
2012-03-19 23:21:58 UTC (rev 114212)
+++ branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.php
2012-03-19 23:25:18 UTC (rev 114213)
@@ -120,6 +120,8 @@
*/
$wgMobileRedirectFormAction = false;
+$wgMobileResourceVersion;
+
$wgExtMobileFrontend = null;
$wgExtensionFunctions[] = 'efMobileFrontend_Setup';
@@ -132,6 +134,7 @@
$wgHooks['APIGetParamDescription'][] =
'ApiParseExtender::onAPIGetParamDescription';
$wgHooks['APIGetDescription'][] = 'ApiParseExtender::onAPIGetDescription';
+
function efMobileFrontend_Setup() {
global $wgExtMobileFrontend, $wgHooks;
$wgExtMobileFrontend = new ExtMobileFrontend();
@@ -140,6 +143,7 @@
$wgHooks['SkinTemplateOutputPageBeforeExec'][] = array(
&$wgExtMobileFrontend, 'addMobileFooter' );
$wgHooks['TestCanonicalRedirect'][] = array( &$wgExtMobileFrontend,
'testCanonicalRedirect' );
$wgHooks['ResourceLoaderTestModules'][] = array( &$wgExtMobileFrontend,
'addTestModules' );
+ $wgHooks['GetCacheVaryCookies'][] = array( &$wgExtMobileFrontend,
'getCacheVaryCookies' );
}
/**
Modified:
branches/wmf/1.19wmf1/extensions/MobileFrontend/templates/ApplicationTemplate.php
===================================================================
---
branches/wmf/1.19wmf1/extensions/MobileFrontend/templates/ApplicationTemplate.php
2012-03-19 23:21:58 UTC (rev 114212)
+++
branches/wmf/1.19wmf1/extensions/MobileFrontend/templates/ApplicationTemplate.php
2012-03-19 23:25:18 UTC (rev 114213)
@@ -7,7 +7,7 @@
class ApplicationTemplate extends MobileFrontendTemplate {
public function getHTML() {
-
+ global $wgMobileResourceVersion;
if ( $this->data['wgAppleTouchIcon'] !== false ) {
$appleTouchIconTag = Html::element( 'link', array(
'rel' => 'apple-touch-icon', 'href' => $this->data['wgAppleTouchIcon'] ) );
} else {
@@ -36,7 +36,7 @@
$jQuerySupport = $this->data['device']['supports_jquery'];
$jQueryScript = $jQuerySupport ? $startScriptTag .
$javaScriptPath . 'jquery-1.7.1.min.js' . $endScriptTag : '';
- $filePageScript = ( $this->data['isFilePage'] ) ?
$startScriptTag . $javaScriptPath . 'filepage.js?version=1332193250' .
$endScriptTag : '';
+ $filePageScript = ( $this->data['isFilePage'] ) ?
$startScriptTag . $javaScriptPath . 'filepage.js?version=' .
$wgMobileResourceVersion . $endScriptTag : '';
$startLinkTag = "<link
href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/";
$endLinkTag = "' media='all' rel='Stylesheet' type='text/css'
/>";
@@ -59,7 +59,7 @@
if( $this->data['isBetaGroupMember'] && $jQuerySupport ) {
$betajs = <<<HTML
-
{$startScriptTag}{$javaScriptPath}references.{$resourceSuffix}js?version=1332193250{$endScriptTag}
+
{$startScriptTag}{$javaScriptPath}references.{$resourceSuffix}js?version={$wgMobileResourceVersion}{$endScriptTag}
HTML;
} else {
$betajs = "";
@@ -71,8 +71,8 @@
<head>
<title>{$this->data['htmlTitle']}</title>
<meta http-equiv="content-type"
content="application/xhtml+xml; charset=utf-8" />
- <link
href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/{$betaPrefix}common.css?version=1332193250'
media='all' rel='Stylesheet' type='text/css' />
- <link
href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/{$cssFileName}.css?version=1332193250'
media='all' rel='Stylesheet' type='text/css' />
+ <link
href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/{$betaPrefix}common.css?version={$wgMobileResourceVersion}'
media='all' rel='Stylesheet' type='text/css' />
+ <link
href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/{$cssFileName}.css?version={$wgMobileResourceVersion}'
media='all' rel='Stylesheet' type='text/css' />
{$filePageStyle}
<meta name="viewport" content="initial-scale=1.0">
{$appleTouchIconTag}
@@ -90,10 +90,10 @@
</div>
{$this->data['footerHtml']}
<!--[if gt IE 9]><!-->
-
{$startScriptTag}{$javaScriptPath}application.{$resourceSuffix}js?version=1332193250{$endScriptTag}
-
{$startScriptTag}{$javaScriptPath}toggle.{$resourceSuffix}js?version=1332193250{$endScriptTag}
-
{$startScriptTag}{$javaScriptPath}banner.{$resourceSuffix}js?version=1332193250{$endScriptTag}
-
{$startScriptTag}{$javaScriptPath}{$betaPrefix}opensearch.{$resourceSuffix}js?version=1332193250{$endScriptTag}
+
{$startScriptTag}{$javaScriptPath}application.{$resourceSuffix}js?version={$wgMobileResourceVersion}{$endScriptTag}
+
{$startScriptTag}{$javaScriptPath}toggle.{$resourceSuffix}js?version={$wgMobileResourceVersion}{$endScriptTag}
+
{$startScriptTag}{$javaScriptPath}banner.{$resourceSuffix}js?version={$wgMobileResourceVersion}{$endScriptTag}
+
{$startScriptTag}{$javaScriptPath}{$betaPrefix}opensearch.{$resourceSuffix}js?version={$wgMobileResourceVersion}{$endScriptTag}
{$betajs}
{$filePageScript}
<!--[endif]-->
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs