Index: branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.body.php |
— | — | @@ -1502,6 +1502,11 @@ |
1503 | 1503 | return $expiry; |
1504 | 1504 | } |
1505 | 1505 | |
| 1506 | + public function getCacheVaryCookies( $out, &$cookies ) { |
| 1507 | + global $wgCookiePrefix; |
| 1508 | + $cookies[] = $wgCookiePrefix . 'mf_useformat'; |
| 1509 | + } |
| 1510 | + |
1506 | 1511 | /** |
1507 | 1512 | * Determine the duration the cookie should last. |
1508 | 1513 | * |
Index: branches/wmf/1.19wmf1/extensions/MobileFrontend/MobileFrontend.php |
— | — | @@ -120,6 +120,8 @@ |
121 | 121 | */ |
122 | 122 | $wgMobileRedirectFormAction = false; |
123 | 123 | |
| 124 | +$wgMobileResourceVersion; |
| 125 | + |
124 | 126 | $wgExtMobileFrontend = null; |
125 | 127 | |
126 | 128 | $wgExtensionFunctions[] = 'efMobileFrontend_Setup'; |
— | — | @@ -132,6 +134,7 @@ |
133 | 135 | $wgHooks['APIGetParamDescription'][] = 'ApiParseExtender::onAPIGetParamDescription'; |
134 | 136 | $wgHooks['APIGetDescription'][] = 'ApiParseExtender::onAPIGetDescription'; |
135 | 137 | |
| 138 | + |
136 | 139 | function efMobileFrontend_Setup() { |
137 | 140 | global $wgExtMobileFrontend, $wgHooks; |
138 | 141 | $wgExtMobileFrontend = new ExtMobileFrontend(); |
— | — | @@ -140,6 +143,7 @@ |
141 | 144 | $wgHooks['SkinTemplateOutputPageBeforeExec'][] = array( &$wgExtMobileFrontend, 'addMobileFooter' ); |
142 | 145 | $wgHooks['TestCanonicalRedirect'][] = array( &$wgExtMobileFrontend, 'testCanonicalRedirect' ); |
143 | 146 | $wgHooks['ResourceLoaderTestModules'][] = array( &$wgExtMobileFrontend, 'addTestModules' ); |
| 147 | + $wgHooks['GetCacheVaryCookies'][] = array( &$wgExtMobileFrontend, 'getCacheVaryCookies' ); |
144 | 148 | } |
145 | 149 | |
146 | 150 | /** |
Index: branches/wmf/1.19wmf1/extensions/MobileFrontend/templates/ApplicationTemplate.php |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | class ApplicationTemplate extends MobileFrontendTemplate { |
9 | 9 | |
10 | 10 | public function getHTML() { |
11 | | - |
| 11 | + global $wgMobileResourceVersion; |
12 | 12 | if ( $this->data['wgAppleTouchIcon'] !== false ) { |
13 | 13 | $appleTouchIconTag = Html::element( 'link', array( 'rel' => 'apple-touch-icon', 'href' => $this->data['wgAppleTouchIcon'] ) ); |
14 | 14 | } else { |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | |
38 | 38 | $jQuerySupport = $this->data['device']['supports_jquery']; |
39 | 39 | $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 : ''; |
41 | 41 | |
42 | 42 | $startLinkTag = "<link href='{$this->data['wgExtensionAssetsPath']}/MobileFrontend/stylesheets/"; |
43 | 43 | $endLinkTag = "' media='all' rel='Stylesheet' type='text/css' />"; |
— | — | @@ -59,7 +59,7 @@ |
60 | 60 | |
61 | 61 | if( $this->data['isBetaGroupMember'] && $jQuerySupport ) { |
62 | 62 | $betajs = <<<HTML |
63 | | - {$startScriptTag}{$javaScriptPath}references.{$resourceSuffix}js?version=1332193250{$endScriptTag} |
| 63 | + {$startScriptTag}{$javaScriptPath}references.{$resourceSuffix}js?version={$wgMobileResourceVersion}{$endScriptTag} |
64 | 64 | HTML; |
65 | 65 | } else { |
66 | 66 | $betajs = ""; |
— | — | @@ -71,8 +71,8 @@ |
72 | 72 | <head> |
73 | 73 | <title>{$this->data['htmlTitle']}</title> |
74 | 74 | <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' /> |
77 | 77 | {$filePageStyle} |
78 | 78 | <meta name="viewport" content="initial-scale=1.0"> |
79 | 79 | {$appleTouchIconTag} |
— | — | @@ -90,10 +90,10 @@ |
91 | 91 | </div> |
92 | 92 | {$this->data['footerHtml']} |
93 | 93 | <!--[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} |
98 | 98 | {$betajs} |
99 | 99 | {$filePageScript} |
100 | 100 | <!--[endif]--> |
Property changes on: branches/wmf/1.19wmf1/extensions/MobileFrontend |
___________________________________________________________________ |
Modified: svn:mergeinfo |
101 | 101 | Merged /trunk/extensions/MobileFrontend:r114211-114212 |