diff --git a/src/Hooks/MainHookHandler.php b/src/Hooks/MainHookHandler.php index 1cf9478..430fa0f 100644 --- a/src/Hooks/MainHookHandler.php +++ b/src/Hooks/MainHookHandler.php @@ -78,13 +78,13 @@ public function onSkinBuildSidebar( $skin, &$bar ) { } } elseif ( array_key_exists( 'iconfile', $tournament ) ) { $iconfileTitle = Title::newFromText( - $iconTemplatePrefix . '/mainpageTST', + $iconTemplatePrefix . '/custom', NS_TEMPLATE ); - if ( $iconfileTitle !== null && $iconfileTitle->exists() && $skin->getTitle() !== null ) { + if ( $skin->getTitle() !== null ) { if ( !$commandLineMode ) { $iconHTML = $out->parseInlineAsInterface( - '{{' . $iconTemplatePrefix . '/mainpageTST|' . + '{{' . $iconTemplatePrefix . '/custom|' . ( array_key_exists( 'icondarkfile', $tournament ) ? 'iconDark=' . $tournament[ 'icondarkfile' ] . '|' : '' ) . diff --git a/src/ParserFunction.php b/src/ParserFunction.php index a690274..da54606 100644 --- a/src/ParserFunction.php +++ b/src/ParserFunction.php @@ -92,7 +92,7 @@ public static function getTournamentsList( $content, $attributes, $parser, $fram } } elseif ( array_key_exists( 'iconfile', $tournament ) ) { $iconfileTitle = Title::newFromText( - $iconTemplatePrefix . '/mainpageTST', + $iconTemplatePrefix . '/custom', NS_TEMPLATE ); if ( @@ -105,7 +105,7 @@ public static function getTournamentsList( $content, $attributes, $parser, $fram $wasParserReportEnabled = $parserOptions->getOption( 'enableLimitReport' ); $parserOptions->setOption( 'enableLimitReport', false ); $iconHTML = $parser->parse( - '{{' . $iconTemplatePrefix . '/mainpageTST|' . + '{{' . $iconTemplatePrefix . '/custom|' . ( array_key_exists( 'icondarkfile', $tournament ) ? 'iconDark=' . $tournament[ 'icondarkfile' ] . '|' : '' ) .