Index: trunk/extensions/MobileFrontend/MobileFrontend.php |
— | — | @@ -49,7 +49,7 @@ |
50 | 50 | $wgHooks['SkinTemplateOutputPageBeforeExec'][] = array( &$wgExtMobileFrontend, 'addMobileFooter' ); |
51 | 51 | |
52 | 52 | class ExtMobileFrontend { |
53 | | - const VERSION = '0.5.28'; |
| 53 | + const VERSION = '0.5.29'; |
54 | 54 | |
55 | 55 | /** |
56 | 56 | * @var DOMDocument |
— | — | @@ -119,7 +119,7 @@ |
120 | 120 | public function addMobileFooter( &$obj, &$tpl ) { |
121 | 121 | global $wgRequest; |
122 | 122 | $footerlinks = $tpl->data['footerlinks']; |
123 | | - $mobileViewUrl = $wgRequest->escapeAppendQuery( 'useFormat=mobile' ); |
| 123 | + $mobileViewUrl = $wgRequest->escapeAppendQuery( 'useformat=mobile' ); |
124 | 124 | |
125 | 125 | $tpl->set('mobileview', "<a href='{$mobileViewUrl}'>".wfMsg( 'mobile-frontend-view')."</a>"); |
126 | 126 | $footerlinks['places'][] = 'mobileview'; |
— | — | @@ -219,7 +219,7 @@ |
220 | 220 | // Thus, globalized objects will not be available as expected in the function. |
221 | 221 | // This is stated to be intended behavior, as per the following: [http://bugs.php.net/bug.php?id=40104] |
222 | 222 | |
223 | | - $mAction = $wgRequest->getText( 'mAction' ); |
| 223 | + $mobileAction = $wgRequest->getText( 'mobileaction' ); |
224 | 224 | $action = $wgRequest->getText( 'action' ); |
225 | 225 | self::$disableImages = $wgRequest->getText( 'disableImages', 0 ); |
226 | 226 | self::$enableImages = $wgRequest->getText( 'enableImages', 0 ); |
— | — | @@ -243,7 +243,7 @@ |
244 | 244 | } |
245 | 245 | |
246 | 246 | |
247 | | - self::$useFormat = $wgRequest->getText( 'useFormat' ); |
| 247 | + self::$useFormat = $wgRequest->getText( 'useformat' ); |
248 | 248 | self::$format = $wgRequest->getText( 'format' ); |
249 | 249 | self::$requestedSegment = $wgRequest->getText( 'seg', 0 ); |
250 | 250 | self::$search = $wgRequest->getText( 'search' ); |
— | — | @@ -264,51 +264,38 @@ |
265 | 265 | $this->contentFormat = 'WML'; |
266 | 266 | } |
267 | 267 | |
268 | | - if ( $mAction == 'disable_mobile_site' ) { |
| 268 | + if ( $mobileAction == 'disable_mobile_site' ) { |
269 | 269 | if ( $this->contentFormat == 'XHTML' ) { |
270 | 270 | echo $this->renderDisableMobileSiteXHTML(); |
271 | 271 | exit(); |
272 | 272 | } |
273 | 273 | } |
274 | 274 | |
275 | | - if ( $mAction == 'opt_in_mobile_site' ) { |
| 275 | + if ( $mobileAction == 'opt_in_mobile_site' ) { |
276 | 276 | if ( $this->contentFormat == 'XHTML' ) { |
277 | 277 | echo $this->renderOptInMobileSiteXHTML(); |
278 | 278 | exit(); |
279 | 279 | } |
280 | 280 | } |
281 | 281 | |
282 | | - if ( $mAction == 'opt_out_mobile_site' ) { |
| 282 | + if ( $mobileAction == 'opt_out_mobile_site' ) { |
283 | 283 | if ( $this->contentFormat == 'XHTML' ) { |
284 | 284 | echo $this->renderOptOutMobileSiteXHTML(); |
285 | 285 | exit(); |
286 | 286 | } |
287 | 287 | } |
288 | 288 | |
289 | | - if ( $mAction == 'opt_in_cookie' ) { |
| 289 | + if ( $mobileAction == 'opt_in_cookie' ) { |
290 | 290 | $this->setOptInOutCookie( '1' ); |
291 | 291 | $this->disableCaching(); |
292 | 292 | $location = Title::newMainPage()->getFullURL(); |
293 | 293 | header( 'Location: ' . $location ); |
294 | 294 | } |
295 | 295 | |
296 | | - if ( $mAction == 'opt_out_cookie' ) { |
| 296 | + if ( $mobileAction == 'opt_out_cookie' ) { |
297 | 297 | $this->setOptInOutCookie( '' ); |
298 | 298 | } |
299 | 299 | |
300 | | - // Note: Temporarily disabling this section for trial deployment |
301 | | - // if ( is_array($props) && |
302 | | - // $mAction != 'view_normal_site' && |
303 | | - // $props['is_wireless_device'] === 'true' && |
304 | | - // $props['is_tablet'] === 'false' ) { |
305 | | - // $this->disableCaching(); |
306 | | - // ob_start( array( $this, 'DOMParse' ) ); |
307 | | - // } elseif (self::$useFormat === 'mobile' || |
308 | | - // self::$useFormat === 'mobile-wap' ) { |
309 | | - // $this->disableCaching(); |
310 | | - // ob_start( array( $this, 'DOMParse' ) ); |
311 | | - // } |
312 | | - |
313 | 300 | // WURFL documentation: http://wurfl.sourceforge.net/help_doc.php |
314 | 301 | // Determine the kind of markup |
315 | 302 | if( is_array( $props ) && $props['preferred_markup'] ) { |
— | — | @@ -338,7 +325,7 @@ |
339 | 326 | self::$useFormat === 'mobile-wap' || |
340 | 327 | !empty( $xDevice ) ) { |
341 | 328 | if ( $action !== 'edit' && |
342 | | - $mAction !== 'view_normal_site' ) { |
| 329 | + $mobileAction !== 'view_normal_site' ) { |
343 | 330 | $this->getMsg(); |
344 | 331 | $this->disableCaching(); |
345 | 332 | $this->sendXDeviceVaryHeader(); |
— | — | @@ -558,7 +545,7 @@ |
559 | 546 | $segmentsCount = count($segments); |
560 | 547 | $card .= "<p>" . $idx . "/" . $segmentsCount . "</p>"; |
561 | 548 | |
562 | | - $useFormatParam = ( isset( self::$useFormat ) ) ? '&' . 'useFormat=' . self::$useFormat : ''; |
| 549 | + $useFormatParam = ( isset( self::$useFormat ) ) ? '&' . 'useformat=' . self::$useFormat : ''; |
563 | 550 | |
564 | 551 | $basePage = htmlspecialchars( $_SERVER['PHP_SELF'] ); |
565 | 552 | |
Index: trunk/extensions/MobileFrontend/views/information/optin.html.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | </p> |
10 | 10 | <div id='disableButtons'> |
11 | 11 | <form action='/' method='get'> |
12 | | - <input name='mAction' type='hidden' value='opt_in_cookie' /> |
| 12 | + <input name='mobileaction' type='hidden' value='opt_in_cookie' /> |
13 | 13 | <button id='disableButton' type='submit'>{$yesButton}</button> |
14 | 14 | </form> |
15 | 15 | <form action='/' method='get'> |
Index: trunk/extensions/MobileFrontend/views/information/optout.html.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | </p> |
10 | 10 | <div id='disableButtons'> |
11 | 11 | <form action='/' method='get'> |
12 | | - <input name='mAction' type='hidden' value='opt_out_cookie' /> |
| 12 | + <input name='mobileaction' type='hidden' value='opt_out_cookie' /> |
13 | 13 | <button id='disableButton' type='submit'>{$yesButton}</button> |
14 | 14 | </form> |
15 | 15 | <form action='/' method='get'> |
Index: trunk/extensions/MobileFrontend/views/layout/_footmenu_default.html.php |
— | — | @@ -12,9 +12,9 @@ |
13 | 13 | <div id='footer'> |
14 | 14 | <div class='nav' id='footmenu'> |
15 | 15 | <div class='mwm-notice'> |
16 | | - <a href="?mAction=view_normal_site">{$regularSite}</a> | <a href="{$imagesURL}">{$imagesToggle}</a> |
| 16 | + <a href="?mobileaction=view_normal_site">{$regularSite}</a> | <a href="{$imagesURL}">{$imagesToggle}</a> |
17 | 17 | <div id="perm"> |
18 | | - <a href="?mAction=disable_mobile_site">{$permStopRedirect}</a> |
| 18 | + <a href="?mobileaction=disable_mobile_site">{$permStopRedirect}</a> |
19 | 19 | </div> |
20 | 20 | </div> |
21 | 21 | </div> |