http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94669
Revision: 94669 Author: preilly Date: 2011-08-16 17:53:11 +0000 (Tue, 16 Aug 2011) Log Message: ----------- mft r94668 Modified Paths: -------------- branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php branches/wmf/1.17wmf1/extensions/MobileFrontend/views/information/optin.html.php branches/wmf/1.17wmf1/extensions/MobileFrontend/views/information/optout.html.php branches/wmf/1.17wmf1/extensions/MobileFrontend/views/layout/_footmenu_default.html.php Modified: branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php =================================================================== --- branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php 2011-08-16 17:51:38 UTC (rev 94668) +++ branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php 2011-08-16 17:53:11 UTC (rev 94669) @@ -49,7 +49,7 @@ $wgHooks['SkinTemplateOutputPageBeforeExec'][] = array( &$wgExtMobileFrontend, 'addMobileFooter' ); class ExtMobileFrontend { - const VERSION = '0.5.28'; + const VERSION = '0.5.29'; /** * @var DOMDocument @@ -119,7 +119,7 @@ public function addMobileFooter( &$obj, &$tpl ) { global $wgRequest; $footerlinks = $tpl->data['footerlinks']; - $mobileViewUrl = $wgRequest->escapeAppendQuery( 'useFormat=mobile' ); + $mobileViewUrl = $wgRequest->escapeAppendQuery( 'useformat=mobile' ); $tpl->set('mobileview', "<a href='{$mobileViewUrl}'>".wfMsg( 'mobile-frontend-view')."</a>"); $footerlinks['places'][] = 'mobileview'; @@ -219,7 +219,7 @@ // Thus, globalized objects will not be available as expected in the function. // This is stated to be intended behavior, as per the following: [http://bugs.php.net/bug.php?id=40104] - $mAction = $wgRequest->getText( 'mAction' ); + $mobileAction = $wgRequest->getText( 'mobileaction' ); $action = $wgRequest->getText( 'action' ); self::$disableImages = $wgRequest->getText( 'disableImages', 0 ); self::$enableImages = $wgRequest->getText( 'enableImages', 0 ); @@ -243,7 +243,7 @@ } - self::$useFormat = $wgRequest->getText( 'useFormat' ); + self::$useFormat = $wgRequest->getText( 'useformat' ); self::$format = $wgRequest->getText( 'format' ); self::$requestedSegment = $wgRequest->getText( 'seg', 0 ); self::$search = $wgRequest->getText( 'search' ); @@ -264,51 +264,38 @@ $this->contentFormat = 'WML'; } - if ( $mAction == 'disable_mobile_site' ) { + if ( $mobileAction == 'disable_mobile_site' ) { if ( $this->contentFormat == 'XHTML' ) { echo $this->renderDisableMobileSiteXHTML(); exit(); } } - if ( $mAction == 'opt_in_mobile_site' ) { + if ( $mobileAction == 'opt_in_mobile_site' ) { if ( $this->contentFormat == 'XHTML' ) { echo $this->renderOptInMobileSiteXHTML(); exit(); } } - if ( $mAction == 'opt_out_mobile_site' ) { + if ( $mobileAction == 'opt_out_mobile_site' ) { if ( $this->contentFormat == 'XHTML' ) { echo $this->renderOptOutMobileSiteXHTML(); exit(); } } - if ( $mAction == 'opt_in_cookie' ) { + if ( $mobileAction == 'opt_in_cookie' ) { $this->setOptInOutCookie( '1' ); $this->disableCaching(); $location = Title::newMainPage()->getFullURL(); header( 'Location: ' . $location ); } - if ( $mAction == 'opt_out_cookie' ) { + if ( $mobileAction == 'opt_out_cookie' ) { $this->setOptInOutCookie( '' ); } - // Note: Temporarily disabling this section for trial deployment - // if ( is_array($props) && - // $mAction != 'view_normal_site' && - // $props['is_wireless_device'] === 'true' && - // $props['is_tablet'] === 'false' ) { - // $this->disableCaching(); - // ob_start( array( $this, 'DOMParse' ) ); - // } elseif (self::$useFormat === 'mobile' || - // self::$useFormat === 'mobile-wap' ) { - // $this->disableCaching(); - // ob_start( array( $this, 'DOMParse' ) ); - // } - // WURFL documentation: http://wurfl.sourceforge.net/help_doc.php // Determine the kind of markup if( is_array( $props ) && $props['preferred_markup'] ) { @@ -338,7 +325,7 @@ self::$useFormat === 'mobile-wap' || !empty( $xDevice ) ) { if ( $action !== 'edit' && - $mAction !== 'view_normal_site' ) { + $mobileAction !== 'view_normal_site' ) { $this->getMsg(); $this->disableCaching(); $this->sendXDeviceVaryHeader(); @@ -558,7 +545,7 @@ $segmentsCount = count($segments); $card .= "<p>" . $idx . "/" . $segmentsCount . "</p>"; - $useFormatParam = ( isset( self::$useFormat ) ) ? '&' . 'useFormat=' . self::$useFormat : ''; + $useFormatParam = ( isset( self::$useFormat ) ) ? '&' . 'useformat=' . self::$useFormat : ''; $basePage = htmlspecialchars( $_SERVER['PHP_SELF'] ); Modified: branches/wmf/1.17wmf1/extensions/MobileFrontend/views/information/optin.html.php =================================================================== --- branches/wmf/1.17wmf1/extensions/MobileFrontend/views/information/optin.html.php 2011-08-16 17:51:38 UTC (rev 94668) +++ branches/wmf/1.17wmf1/extensions/MobileFrontend/views/information/optin.html.php 2011-08-16 17:53:11 UTC (rev 94669) @@ -8,7 +8,7 @@ </p> <div id='disableButtons'> <form action='/' method='get'> - <input name='mAction' type='hidden' value='opt_in_cookie' /> + <input name='mobileaction' type='hidden' value='opt_in_cookie' /> <button id='disableButton' type='submit'>{$yesButton}</button> </form> <form action='/' method='get'> Modified: branches/wmf/1.17wmf1/extensions/MobileFrontend/views/information/optout.html.php =================================================================== --- branches/wmf/1.17wmf1/extensions/MobileFrontend/views/information/optout.html.php 2011-08-16 17:51:38 UTC (rev 94668) +++ branches/wmf/1.17wmf1/extensions/MobileFrontend/views/information/optout.html.php 2011-08-16 17:53:11 UTC (rev 94669) @@ -8,7 +8,7 @@ </p> <div id='disableButtons'> <form action='/' method='get'> - <input name='mAction' type='hidden' value='opt_out_cookie' /> + <input name='mobileaction' type='hidden' value='opt_out_cookie' /> <button id='disableButton' type='submit'>{$yesButton}</button> </form> <form action='/' method='get'> Modified: branches/wmf/1.17wmf1/extensions/MobileFrontend/views/layout/_footmenu_default.html.php =================================================================== --- branches/wmf/1.17wmf1/extensions/MobileFrontend/views/layout/_footmenu_default.html.php 2011-08-16 17:51:38 UTC (rev 94668) +++ branches/wmf/1.17wmf1/extensions/MobileFrontend/views/layout/_footmenu_default.html.php 2011-08-16 17:53:11 UTC (rev 94669) @@ -12,9 +12,9 @@ <div id='footer'> <div class='nav' id='footmenu'> <div class='mwm-notice'> - <a href="?mAction=view_normal_site">{$regularSite}</a> | <a href="{$imagesURL}">{$imagesToggle}</a> + <a href="?mobileaction=view_normal_site">{$regularSite}</a> | <a href="{$imagesURL}">{$imagesToggle}</a> <div id="perm"> - <a href="?mAction=disable_mobile_site">{$permStopRedirect}</a> + <a href="?mobileaction=disable_mobile_site">{$permStopRedirect}</a> </div> </div> </div> _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs