From: Brad Jorsch Date: Fri, 12 May 2017 16:28:22 +0000 (-0400) Subject: ParserOptions: Include wrapping class in options hash X-Git-Tag: 1.31.0-rc.0~3249^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=ecb4c0e3fe119928e26084645e524f5840194504;p=lhc%2Fweb%2Fwiklou.git ParserOptions: Include wrapping class in options hash Avoids polluting the cache when things take advantage of the option. Bug: T165115 Bug: T165161 Change-Id: I5be25c6de68012df58b6a0cbf92e2f972be2b68a --- diff --git a/includes/parser/ParserOptions.php b/includes/parser/ParserOptions.php index d4d104231d..d097414aff 100644 --- a/includes/parser/ParserOptions.php +++ b/includes/parser/ParserOptions.php @@ -493,6 +493,7 @@ class ParserOptions { * @return string|bool */ public function getWrapOutputClass() { + $this->optionUsed( 'wrapclass' ); return $this->wrapOutputClass; } @@ -943,6 +944,10 @@ class ParserOptions { $confstr .= '!printable=1'; } + if ( $this->wrapOutputClass !== 'mw-parser-output' && in_array( 'wrapclass', $forOptions ) ) { + $confstr .= '!wrapclass=' . $this->wrapOutputClass; + } + if ( $this->mExtraKey != '' ) { $confstr .= $this->mExtraKey; }