*/
public $mSections = [];
- /**
- * @deprecated since 1.31 Use getText() options.
- * @var bool $mEditSectionTokens prefix/suffix markers if edit sections were output as tokens.
- */
- public $mEditSectionTokens = true;
-
/**
* @var array $mProperties Name/value pairs to be cached in the DB.
*/
*/
public $mTimestamp;
- /**
- * @deprecated since 1.31 Use getText() options.
- * @var bool $mTOCEnabled Whether TOC should be shown, can't override __NOTOC__.
- */
- public $mTOCEnabled = true;
-
/**
* @var bool $mEnableOOUI Whether OOUI should be enabled.
*/
* @return string HTML
*/
public function getText( $options = [] ) {
- if ( !array_key_exists( 'allowTOC', $options ) && empty( $this->mTOCEnabled ) ) {
- wfDeprecated( 'ParserOutput stateful allowTOC', '1.31' );
- }
-
- // Note that while $this->mEditSectionTokens formerly defaulted to false,
- // ParserOptions->getEditSection() defaults to true and Parser copies
- // that to us so true makes more sense as the stateless default.
- if ( !array_key_exists( 'enableSectionEditLinks', $options ) && !$this->mEditSectionTokens ) {
- wfDeprecated( 'ParserOutput stateful enableSectionEditLinks', '1.31' );
- }
-
$options += [
- // empty() here because old cached versions might lack the field somehow.
- // In that situation, the historical behavior (possibly buggy) is to remove the TOC.
- 'allowTOC' => !empty( $this->mTOCEnabled ),
- 'enableSectionEditLinks' => $this->mEditSectionTokens,
+ 'allowTOC' => true,
+ 'enableSectionEditLinks' => true,
'unwrap' => false,
'deduplicateStyles' => true,
];
* @deprecated since 1.31 Use getText() options.
*/
public function getEditSectionTokens() {
- return $this->mEditSectionTokens;
+ wfDeprecated( __METHOD__, '1.31' );
+ return true;
}
public function &getLinks() {
* @deprecated since 1.31 Use getText() options.
*/
public function getTOCEnabled() {
- return $this->mTOCEnabled;
+ wfDeprecated( __METHOD__, '1.31' );
+ return true;
}
public function getEnableOOUI() {
* @deprecated since 1.31 Use getText() options.
*/
public function setEditSectionTokens( $t ) {
- return wfSetVar( $this->mEditSectionTokens, $t );
+ wfDeprecated( __METHOD__, '1.31' );
+ return true;
}
public function setIndexPolicy( $policy ) {
* @deprecated since 1.31 Use getText() options.
*/
public function setTOCEnabled( $flag ) {
- return wfSetVar( $this->mTOCEnabled, $flag );
+ wfDeprecated( __METHOD__, '1.31' );
+ return true;
}
public function addCategory( $c, $sort ) {