Use getDefinitionSummary instead, which uses a single serialisation
pass instead of requiring every stage to be a string. This way
we don't need to call json_encode and md5() multiple times.
getModifiedHash() was deprecated in MediaWiki 1.26.
Change-Id: If9e9caa3d12976c99543ad53ab280355b70acb17
class ResourceLoaderSkinModule extends ResourceLoaderFileModule {
- /* Methods */
-
/**
* @param ResourceLoaderContext $context
* @return array
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;
}
}