class ResourceLoaderSkinModule extends ResourceLoaderFileModule {
- /* Methods */
-
/**
* @param ResourceLoaderContext $context
* @return array
$styles['all'][] = '.mw-wiki-logo { background-image: ' .
CSSMin::buildUrlValue( $logo1 ) .
'; }';
+ // Only 1.5x and 2x are supported
+ // Note: Keep in sync with OutputPage::addLogoPreloadLinkHeaders()
if ( $logoHD ) {
if ( isset( $logoHD['1.5x'] ) ) {
$styles[
return false;
}
- /**
- * @param ResourceLoaderContext $context
- * @return string: Hash
- */
- public function getModifiedHash( ResourceLoaderContext $context ) {
- $logo = $this->getConfig()->get( 'Logo' );
- $logoHD = $this->getConfig()->get( 'LogoHD' );
- return md5( parent::getModifiedHash( $context ) . $logo . json_encode( $logoHD ) );
+ public function getDefinitionSummary( ResourceLoaderContext $context ) {
+ $summary = parent::getDefinitionSummary( $context );
+ $summary[] = [
+ 'logo' => $this->getConfig()->get( 'Logo' ),
+ 'logoHD' => $this->getConfig()->get( 'LogoHD' ),
+ ];
+ return $summary;
}
}