}
$class = $config['class'];
- $config['readOnly'] = !empty( $config['readOnly'] )
- ? $config['readOnly']
- : $readOnlyReason;
+ $config['readOnly'] = $config['readOnly'] ?? $readOnlyReason;
unset( $config['class'] ); // backend won't need this
$this->backends[$name] = [
$config = $this->backends[$name]['config'];
$config['class'] = $class;
$config += [ // set defaults
+ // @FIXME: this does not include the domain for b/c but it ideally should
'wikiId' => wfWikiID(), // e.g. "my_wiki-en_"
'mimeCallback' => [ $this, 'guessMimeInternal' ],
'obResetFunc' => 'wfResetOutputBuffers',
'wanCache' => MediaWikiServices::getInstance()->getMainWANObjectCache(),
'srvCache' => ObjectCache::getLocalServerInstance( 'hash' ),
'logger' => LoggerFactory::getInstance( 'FileOperation' ),
- 'profiler' => Profiler::instance()
+ 'profiler' => function ( $section ) {
+ return Profiler::instance()->scopedProfileIn( $section );
+ }
];
$config['lockManager'] =
LockManagerGroup::singleton( $config['wikiId'] )->get( $config['lockManager'] );