getConfig()->get( 'UseSiteJs' ) ) { $pages['MediaWiki:Common.js'] = array( 'type' => 'script' ); $pages['MediaWiki:' . ucfirst( $context->getSkin() ) . '.js'] = array( 'type' => 'script' ); } if ( $this->getConfig()->get( 'UseSiteCss' ) ) { $pages['MediaWiki:Common.css'] = array( 'type' => 'style' ); $pages['MediaWiki:' . ucfirst( $context->getSkin() ) . '.css'] = array( 'type' => 'style' ); } $pages['MediaWiki:Print.css'] = array( 'type' => 'style', 'media' => 'print' ); return $pages; } /* Methods */ /** * @param $context ResourceLoaderContext * @return array */ public function getStyles( ResourceLoaderContext $context ) { global $wgLogo; $styles = parent::getStyles( $context ); $styles['all'][] = '.mw-wiki-logo { background-image: ' . CSSMin::buildUrlValue( $wgLogo ) . '; }'; return $styles; } /** * @param $context ResourceLoaderContext * @return boolean */ public function isKnownEmpty( ResourceLoaderContext $context ) { // Regardless of whether the wiki page(s) exist, we always // provide mw-wiki-logo styles. return false; } /** * @param $context ResourceLoaderContext * @return int|mixed */ public function getModifiedTime( ResourceLoaderContext $context ) { $parentMTime = parent::getModifiedTime( $context ); return max( $parentMTime, $this->getHashMtime( $context ) ); } /** * @param $context ResourceLoaderContext * @return string: Hash */ public function getModifiedHash( ResourceLoaderContext $context ) { global $wgLogo; return md5( parent::getModifiedHash( $context ) . $wgLogo ); } /** * Gets group name * * @return string Name of group */ public function getGroup() { return 'site'; } }