Skip to content

Commit

Permalink
Improve memory management in MirahezeMagicHooks
Browse files Browse the repository at this point in the history
  • Loading branch information
paladox authored Aug 16, 2023
1 parent 59f3d75 commit d37fa54
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion includes/MirahezeMagicHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,8 @@ public static function onGlobalUserPageWikis( &$list ) {
$config = MediaWikiServices::getInstance()->getConfigFactory()->makeConfig( 'mirahezemagic' );
$cwCacheDir = $config->get( 'CreateWikiCacheDirectory' );
if ( file_exists( "{$cwCacheDir}/databases.json" ) ) {
$databasesArray = json_decode( file_get_contents( "{$cwCacheDir}/databases.json" ), true );
$databaseFile = file_get_contents( "{$cwCacheDir}/databases.json" );
$databasesArray = json_decode( $databaseFile, true );
$list = array_keys( $databasesArray['combi'] );
return false;
}
Expand Down

0 comments on commit d37fa54

Please sign in to comment.