Index: trunk/extensions/MobileFrontend/ApiParseExtender.php |
— | — | @@ -16,6 +16,7 @@ |
17 | 17 | ApiBase::PARAM_TYPE => array( 'wml', 'html' ), |
18 | 18 | ); |
19 | 19 | $params['expandablesections'] = false; |
| 20 | + $params['noimages'] = false; |
20 | 21 | } |
21 | 22 | return true; |
22 | 23 | } |
— | — | @@ -29,7 +30,9 @@ |
30 | 31 | public static function onAPIGetParamDescription( ApiBase &$module, Array &$params ) { |
31 | 32 | if ( $module->getModuleName() == 'parse' ) { |
32 | 33 | $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'; |
34 | 37 | } |
35 | 38 | return true; |
36 | 39 | } |
— | — | @@ -82,6 +85,7 @@ |
83 | 86 | $mf->enableExpandableSections(); |
84 | 87 | } |
85 | 88 | } |
| 89 | + $mf->removeImages( $params['noimages'] ); |
86 | 90 | $mf->filterContent(); |
87 | 91 | $data['parse']['text'] = $mf->getText( 'content' ); |
88 | 92 | |