mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 17:44:38 +09:00
Remove unnecessary conversion of ftp.config.php
https://xetown.com/questions/1819188
This commit is contained in:
parent
ab5a2c4f5f
commit
267aa9c397
2 changed files with 6 additions and 24 deletions
|
|
@ -39,6 +39,7 @@ return array(
|
||||||
'counter' => true,
|
'counter' => true,
|
||||||
'document' => true,
|
'document' => true,
|
||||||
'editor' => true,
|
'editor' => true,
|
||||||
|
'extravar' => true,
|
||||||
'file' => true,
|
'file' => true,
|
||||||
'importer' => true,
|
'importer' => true,
|
||||||
'install' => true,
|
'install' => true,
|
||||||
|
|
|
||||||
|
|
@ -31,14 +31,6 @@ class ConfigParser
|
||||||
return array();
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load FTP info file.
|
|
||||||
if (file_exists(\RX_BASEDIR . Config::OLD_FTP_CONFIG_PATH))
|
|
||||||
{
|
|
||||||
ob_start();
|
|
||||||
include \RX_BASEDIR . Config::OLD_FTP_CONFIG_PATH;
|
|
||||||
ob_end_clean();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Load selected language file.
|
// Load selected language file.
|
||||||
if (file_exists(\RX_BASEDIR . Config::OLD_LANG_CONFIG_PATH))
|
if (file_exists(\RX_BASEDIR . Config::OLD_LANG_CONFIG_PATH))
|
||||||
{
|
{
|
||||||
|
|
@ -151,17 +143,6 @@ class ConfigParser
|
||||||
$config['cache']['servers'] = in_array($config['cache']['type'], array('memcached', 'redis')) ? $db_info->use_object_cache : array();
|
$config['cache']['servers'] = in_array($config['cache']['type'], array('memcached', 'redis')) ? $db_info->use_object_cache : array();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert FTP configuration.
|
|
||||||
if (isset($ftp_info))
|
|
||||||
{
|
|
||||||
$config['ftp']['host'] = $ftp_info->ftp_host;
|
|
||||||
$config['ftp']['port'] = $ftp_info->ftp_port;
|
|
||||||
$config['ftp']['path'] = $ftp_info->ftp_root_path;
|
|
||||||
$config['ftp']['user'] = $ftp_info->ftp_user;
|
|
||||||
$config['ftp']['pasv'] = $ftp_info->ftp_pasv;
|
|
||||||
$config['ftp']['sftp'] = $ftp_info->sftp === 'Y' ? true : false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create new crypto keys.
|
// Create new crypto keys.
|
||||||
$config['crypto']['encryption_key'] = Security::getRandom(64, 'alnum');
|
$config['crypto']['encryption_key'] = Security::getRandom(64, 'alnum');
|
||||||
$config['crypto']['authentication_key'] = $db_info->secret_key ?: Security::getRandom(64, 'alnum');
|
$config['crypto']['authentication_key'] = $db_info->secret_key ?: Security::getRandom(64, 'alnum');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue