r114341 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114340‎ | r114341 | r114342 >
Date:01:04, 21 March 2012
Author:awjrichards
Status:ok
Tags:
Comment:
Making sure that useformat=mobile-wap is honored
Modified paths:
  • /trunk/extensions/MobileFrontend/MobileFrontend.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/MobileFrontend.body.php
@@ -443,7 +443,9 @@
444444 self::$device = $device->format( $formatName );
445445 $this->setDefaultLogo();
446446
447 - $this->contentFormat = self::parseContentFormat( self::$device['view_format'] );
 447+ // honor useformat=mobile-wap if it's set, otherwise determine by device
 448+ $viewFormat = ( $this->getUseFormat() == 'mobile-wap' ) ? 'mobile-wap' : self::$device['view_format'];
 449+ $this->contentFormat = self::parseContentFormat( $viewFormat );
448450
449451 if ( $mobileAction == 'leave_feedback' ) {
450452 echo $this->renderLeaveFeedbackXHTML();

Follow-up revisions

RevisionCommit summaryAuthorDate
r114342MFT r114341awjrichards01:05, 21 March 2012

Status & tagging log