<?php
/**
- * Created on Dec 01, 2007
- *
* Copyright © 2007 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
*
* This program is free software; you can redistribute it and/or modify
$result_array['textsuppressed'] = true;
}
- if ( $params['disabletoc'] ) {
- $p_result->setTOCEnabled( false );
- }
-
if ( isset( $params['useskin'] ) ) {
$factory = MediaWikiServices::getInstance()->getSkinFactory();
$skin = $factory->makeSkin( Skin::normalizeKey( $params['useskin'] ) );
}
if ( isset( $prop['text'] ) ) {
- $result_array['text'] = $p_result->getText();
+ $result_array['text'] = $p_result->getText( [
+ 'allowTOC' => !$params['disabletoc'],
+ 'enableSectionEditLinks' => !$params['disableeditsection'],
+ 'unwrap' => $params['wrapoutputclass'] === '',
+ 'deduplicateStyles' => !$params['disablestylededuplication'],
+ ] );
$result_array[ApiResult::META_BC_SUBELEMENTS][] = 'text';
}
$popts->enableLimitReport( !$params['disablepp'] && !$params['disablelimitreport'] );
$popts->setIsPreview( $params['preview'] || $params['sectionpreview'] );
$popts->setIsSectionPreview( $params['sectionpreview'] );
- $popts->setEditSection( !$params['disableeditsection'] );
if ( $params['disabletidy'] ) {
$popts->setTidy( false );
}
- $popts->setWrapOutputClass(
- $params['wrapoutputclass'] === '' ? false : $params['wrapoutputclass']
- );
+ if ( $params['wrapoutputclass'] !== '' ) {
+ $popts->setWrapOutputClass( $params['wrapoutputclass'] );
+ }
$reset = null;
$suppressCache = false;
'disablelimitreport' => false,
'disableeditsection' => false,
'disabletidy' => false,
+ 'disablestylededuplication' => false,
'generatexml' => [
ApiBase::PARAM_DFLT => false,
ApiBase::PARAM_HELP_MSG => [