# XXX: this might be better using restrictions
if ( $action === 'patrol' ) {
- return [];
+ return $errors;
}
if ( preg_match( '/^' . preg_quote( $user->getName(), '/' ) . '\//', $this->mTextform ) ) {
$dbw = wfGetDB( DB_MASTER );
$dbw->onTransactionPreCommitOrIdle(
- function () {
- ResourceLoaderWikiModule::invalidateModuleCache( $this, null, null, wfWikiID() );
+ function () use ( $dbw ) {
+ ResourceLoaderWikiModule::invalidateModuleCache(
+ $this, null, null, $dbw->getDomainId() );
},
__METHOD__
);