Change-Id: I1c6d3874dd78023d743a418039c23adb55578f98
* @return array
*/
public function buildSidebar() {
* @return array
*/
public function buildSidebar() {
+ $services = MediaWikiServices::getInstance();
$callback = function ( $old = null, &$ttl = null ) {
$bar = [];
$this->addToSidebar( $bar, 'sidebar' );
Hooks::run( 'SkinBuildSidebar', [ $this, &$bar ] );
$callback = function ( $old = null, &$ttl = null ) {
$bar = [];
$this->addToSidebar( $bar, 'sidebar' );
Hooks::run( 'SkinBuildSidebar', [ $this, &$bar ] );
- if ( MessageCache::singleton()->isDisabled() ) {
+ $msgCache = MediaWikiServices::getInstance()->getMessageCache();
+ if ( $msgCache->isDisabled() ) {
$ttl = WANObjectCache::TTL_UNCACHEABLE; // bug T133069
}
return $bar;
};
$ttl = WANObjectCache::TTL_UNCACHEABLE; // bug T133069
}
return $bar;
};
- $msgCache = MessageCache::singleton();
- $wanCache = MediaWikiServices::getInstance()->getMainWANObjectCache();
+ $msgCache = $services->getMessageCache();
+ $wanCache = $services->getMainWANObjectCache();
$config = $this->getConfig();
$sidebar = $config->get( 'EnableSidebarCache' )
$config = $this->getConfig();
$sidebar = $config->get( 'EnableSidebarCache' )