r111549 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111548‎ | r111549 | r111550 >
Date:15:48, 15 February 2012
Author:maxsem
Status:ok
Tags:
Comment:
Option to disable images
Modified paths:
  • /trunk/extensions/MobileFrontend/ApiParseExtender.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MobileFrontend/ApiParseExtender.php
@@ -16,6 +16,7 @@
1717 ApiBase::PARAM_TYPE => array( 'wml', 'html' ),
1818 );
1919 $params['expandablesections'] = false;
 20+ $params['noimages'] = false;
2021 }
2122 return true;
2223 }
@@ -29,7 +30,9 @@
3031 public static function onAPIGetParamDescription( ApiBase &$module, Array &$params ) {
3132 if ( $module->getModuleName() == 'parse' ) {
3233 $params['mobileformat'] = 'Return parse output in a format suitable for mobile devices';
33 - $params['expandablesections'] = 'Make sections collapsed by default, expandable via JavaScript';
 34+ $params['expandablesections'] = 'Make sections in mobile output collapsed by default, expandable via JavaScript.'
 35+ . " Ignored if `section' parameter is set.";
 36+ $params['noimages'] = 'Disable images in mobile output';
3437 }
3538 return true;
3639 }
@@ -82,6 +85,7 @@
8386 $mf->enableExpandableSections();
8487 }
8588 }
 89+ $mf->removeImages( $params['noimages'] );
8690 $mf->filterContent();
8791 $data['parse']['text'] = $mf->getText( 'content' );
8892

Status & tagging log