From e6224e8c0e8d1699772b36f89095d35506f159df Mon Sep 17 00:00:00 2001 From: CosmicAlpha Date: Tue, 19 Nov 2024 17:08:55 -0700 Subject: [PATCH] Update --- includes/FormFactory/ManageWikiFormFactoryBuilder.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/FormFactory/ManageWikiFormFactoryBuilder.php b/includes/FormFactory/ManageWikiFormFactoryBuilder.php index 932072a6d..1edc4bcbe 100644 --- a/includes/FormFactory/ManageWikiFormFactoryBuilder.php +++ b/includes/FormFactory/ManageWikiFormFactoryBuilder.php @@ -76,7 +76,9 @@ private static function buildDescriptorCore( 'section' => 'main' ]; - if ( $ceMW && ( $config->get( 'DBname' ) == $config->get( 'CreateWikiGlobalWiki' ) ) && ( $remoteWiki->getDBname() !== $config->get( 'CreateWikiGlobalWiki' ) ) ) { + $databaseUtils = MediaWikiServices::getInstance()->get( 'CreateWikiDatabaseUtils' ); + + if ( $ceMW && $databaseUtils->isCurrentWikiCentral() && ( $remoteWiki->getDBname() !== $databaseUtils->getCentralWikiID() ) ) { $mwActions = [ ( $remoteWiki->isDeleted() ) ? 'undelete' : 'delete', ( $remoteWiki->isLocked() ) ? 'unlock' : 'lock'