Skip to content

Commit 45a7c37

Browse files
Fix
1 parent b826b1a commit 45a7c37

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

maintenance/ManageInactiveWikis.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ public function execute(): void {
3232
$this->fatalError( 'Enable $wgCreateWikiEnableManageInactiveWikis to run this script.' );
3333
}
3434

35+
$inactiveDays = (int)$this->getConfig()->get( ConfigNames::StateDays )['no-edits']['inactive'];
36+
3537
$databaseUtils = $this->getServiceContainer()->get( 'CreateWikiDatabaseUtils' );
3638
$remoteWikiFactory = $this->getServiceContainer()->get( 'RemoteWikiFactory' );
3739

@@ -48,10 +50,7 @@ public function execute(): void {
4850
->fetchFieldValues();
4951

5052
foreach ( $wikis as $wiki ) {
51-
$dbname = $wiki->wiki_dbname;
52-
$remoteWiki = $remoteWikiFactory->newInstance( $dbname );
53-
$inactiveDays = (int)$this->getConfig()->get( ConfigNames::StateDays )['no-edits']['inactive'];
54-
53+
$remoteWiki = $remoteWikiFactory->newInstance( $wiki );
5554
$remoteWiki->disableResetDatabaseLists();
5655

5756
// Check if the wiki is inactive based on creation date

0 commit comments

Comments
 (0)