https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114341

Revision: 114341
Author:   awjrichards
Date:     2012-03-21 01:04:25 +0000 (Wed, 21 Mar 2012)
Log Message:
-----------
Making sure that useformat=mobile-wap is honored

Modified Paths:
--------------
    trunk/extensions/MobileFrontend/MobileFrontend.body.php

Modified: trunk/extensions/MobileFrontend/MobileFrontend.body.php
===================================================================
--- trunk/extensions/MobileFrontend/MobileFrontend.body.php     2012-03-21 
01:02:17 UTC (rev 114340)
+++ trunk/extensions/MobileFrontend/MobileFrontend.body.php     2012-03-21 
01:04:25 UTC (rev 114341)
@@ -443,7 +443,9 @@
                self::$device = $device->format( $formatName );
                $this->setDefaultLogo();
 
-               $this->contentFormat = self::parseContentFormat( 
self::$device['view_format'] );
+               // honor useformat=mobile-wap if it's set, otherwise determine 
by device
+               $viewFormat = ( $this->getUseFormat() == 'mobile-wap' ) ? 
'mobile-wap' : self::$device['view_format'];
+               $this->contentFormat = self::parseContentFormat( $viewFormat );
 
                if ( $mobileAction == 'leave_feedback' ) {
                        echo $this->renderLeaveFeedbackXHTML();


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to