Skip to content

Commit

Permalink
make production, not beta the fallback database list (#4586)
Browse files Browse the repository at this point in the history
  • Loading branch information
Universal-Omega committed Apr 14, 2022
1 parent 57951ea commit e4af8ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions initialise/MirahezeFunctions.php
Expand Up @@ -52,7 +52,7 @@ public static function getLocalDatabases() {
static $list = null;
static $databases = null;

$list ??= isset( array_flip( self::readDbListFile( 'production' ) )[ self::getCurrentDatabase() ] ) ? 'production' : 'beta';
$list ??= isset( array_flip( self::readDbListFile( 'beta' ) )[ self::getCurrentDatabase() ] ) ? 'beta' : 'production';
$databases ??= self::readDbListFile( $list );

return $databases;
Expand Down Expand Up @@ -120,8 +120,8 @@ public static function setupHooks() {
public static function getRealm() {
static $realm = null;

$realm ??= isset( array_flip( self::readDbListFile( 'production' ) )[ self::getCurrentDatabase() ] ) ?
self::TAGS['default'] : self::TAGS['beta'];
$realm ??= isset( array_flip( self::readDbListFile( 'beta' ) )[ self::getCurrentDatabase() ] ) ?
self::TAGS['beta'] : self::TAGS['default'];

return $realm;
}
Expand All @@ -130,7 +130,7 @@ public static function getServers( $database = null ) {
$servers = [];

static $list = null;
$list ??= isset( array_flip( self::readDbListFile( 'production' ) )[ self::getCurrentDatabase() ] ) ? 'production' : 'beta';
$list ??= isset( array_flip( self::readDbListFile( 'beta' ) )[ self::getCurrentDatabase() ] ) ? 'beta' : 'production';

$databases = self::readDbListFile( $list, false, $database );

Expand Down

0 comments on commit e4af8ce

Please sign in to comment.