Stop providing XE-compatible $db_info and db.config.php

This commit is contained in:
Kijin Sung 2020-09-29 00:55:10 +09:00
parent 177a6c6b7d
commit 0f9b96f9b4
2 changed files with 15 additions and 87 deletions

View file

@ -140,14 +140,9 @@ class Config
$result = Storage::write(\RX_BASEDIR . self::$config_filename, $buff) ? true : false;
// Save XE-compatible config files.
$db_info = \Context::convertDBInfo(self::$_config);
$ftp_info = $db_info->ftp_info;
$db_info_without_ftp = clone $db_info;
unset($db_info_without_ftp->ftp_info);
$warning = '// DO NOT EDIT THIS FILE. CHANGES WILL NOT BE APPLIED.' . "\n" . '// TO CHANGE RHYMIX SYSTEM CONFIGURATION, EDIT config.php INSTEAD.';
$buff = '<?php' . "\n\n" . $warning . "\n\n" . '$db_info = ' . self::serialize($db_info_without_ftp) . ';' . "\n";
$warning = '// THIS FILE IS NOT USED IN RHYMIX.' . "\n" . '// TO MODIFY SYSTEM CONFIGURATION, EDIT config.php INSTEAD.';
$buff = '<?php' . "\n" . $warning . "\n";
Storage::write(\RX_BASEDIR . self::$old_db_config_filename, $buff);
$buff = '<?php' . "\n\n" . $warning . "\n\n" . '$ftp_info = ' . self::serialize($ftp_info) . ';' . "\n";
Storage::write(\RX_BASEDIR . self::$old_ftp_config_filename, $buff);
return $result;
}