mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateStyles
synced 2024-11-27 09:41:16 +00:00
Fix remaining phpcs exclusion
Change-Id: I78ac050a998f62f8b0258f0549b9e4f13cc95f0b
This commit is contained in:
parent
542b92e2db
commit
acecfc462d
|
@ -1,8 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<ruleset>
|
||||
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
|
||||
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
|
||||
</rule>
|
||||
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki" />
|
||||
<file>.</file>
|
||||
<arg name="extensions" value="php" />
|
||||
<arg name="encoding" value="UTF-8" />
|
||||
|
|
|
@ -204,7 +204,8 @@ class Hooks {
|
|||
*/
|
||||
public static function onParserFirstCallInit( Parser $parser ) {
|
||||
$parser->setHook( 'templatestyles', [ __CLASS__, 'handleTag' ] );
|
||||
$parser->extTemplateStylesCache = new MapCacheLRU( 100 ); // 100 is arbitrary
|
||||
// 100 is arbitrary
|
||||
$parser->extTemplateStylesCache = new MapCacheLRU( 100 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -331,7 +332,8 @@ class Hooks {
|
|||
|
||||
// Include any non-default wrapper class in the cache key too
|
||||
$wrapClass = $parser->getOptions()->getWrapOutputClass();
|
||||
if ( $wrapClass === false ) { // deprecated
|
||||
if ( $wrapClass === false ) {
|
||||
// deprecated
|
||||
$wrapClass = 'mw-parser-output';
|
||||
}
|
||||
if ( $wrapClass !== 'mw-parser-output' || $extraWrapper !== null ) {
|
||||
|
|
|
@ -158,7 +158,8 @@ class TemplateStylesContentHandler extends CodeContentHandler {
|
|||
$sanitizer = Hooks::getSanitizer(
|
||||
$options['class'] ?: 'mw-parser-output', $options['extraWrapper']
|
||||
);
|
||||
$sanitizer->clearSanitizationErrors(); // Just in case
|
||||
// Just in case
|
||||
$sanitizer->clearSanitizationErrors();
|
||||
$stylesheet = $sanitizer->sanitize( $stylesheet );
|
||||
self::processErrors( $status, $sanitizer->getSanitizationErrors(), $options['severity'] );
|
||||
$sanitizer->clearSanitizationErrors();
|
||||
|
|
Loading…
Reference in a new issue