mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 04:24:14 +09:00
#43 코드 정리.
This commit is contained in:
parent
dfb270ce64
commit
08de7c40cc
2 changed files with 12 additions and 13 deletions
|
|
@ -214,15 +214,15 @@ class Context
|
||||||
|
|
||||||
$this->loadDBInfo();
|
$this->loadDBInfo();
|
||||||
|
|
||||||
$context = Context::getInstance();
|
if($this->db_info->use_sitelock == 'Y')
|
||||||
|
{
|
||||||
if($context->db_info->use_sitelock == 'Y') {
|
|
||||||
$whitelist = array('127.0.0.1', '::1', 'fe80::1');
|
$whitelist = array('127.0.0.1', '::1', 'fe80::1');
|
||||||
if(is_array($context->db_info->sitelock_whitelist)) $whitelist = array_merge($whitelist, $context->db_info->sitelock_whitelist);
|
if(is_array($this->db_info->sitelock_whitelist)) $whitelist = array_merge($whitelist, $this->db_info->sitelock_whitelist);
|
||||||
|
|
||||||
if(!in_array($_SERVER['REMOTE_ADDR'], $whitelist)) {
|
if(!in_array($_SERVER['REMOTE_ADDR'], $whitelist))
|
||||||
$title = ($context->db_info->sitelock_title) ? $context->db_info->sitelock_title : 'Maintenance in progress...';
|
{
|
||||||
$message = $context->db_info->sitelock_message;
|
$title = ($this->db_info->sitelock_title) ? $this->db_info->sitelock_title : 'Maintenance in progress...';
|
||||||
|
$message = $this->db_info->sitelock_message;
|
||||||
|
|
||||||
define('_XE_SITELOCK_', TRUE);
|
define('_XE_SITELOCK_', TRUE);
|
||||||
define('_XE_SITELOCK_TITLE_', $title);
|
define('_XE_SITELOCK_TITLE_', $title);
|
||||||
|
|
|
||||||
|
|
@ -485,7 +485,6 @@ class adminAdminController extends admin
|
||||||
$vars = Context::getRequestVars();
|
$vars = Context::getRequestVars();
|
||||||
$oInstallController = &getController('install');
|
$oInstallController = &getController('install');
|
||||||
|
|
||||||
$config_file = Context::getConfigFile();
|
|
||||||
$db_info = Context::getDbInfo();
|
$db_info = Context::getDbInfo();
|
||||||
|
|
||||||
$db_info->use_sitelock = ($vars->use_sitelock) ? $vars->use_sitelock : 'N';
|
$db_info->use_sitelock = ($vars->use_sitelock) ? $vars->use_sitelock : 'N';
|
||||||
|
|
@ -494,13 +493,13 @@ class adminAdminController extends admin
|
||||||
|
|
||||||
$db_info->sitelock_whitelist = preg_replace("/[\r\n|\r|\n]+/", ",", $vars->sitelock_whitelist);
|
$db_info->sitelock_whitelist = preg_replace("/[\r\n|\r|\n]+/", ",", $vars->sitelock_whitelist);
|
||||||
|
|
||||||
$buff = $oInstallController->_getDBConfigFileContents($db_info);
|
FileHandler::writeFile(Context::getConfigFile(), $oInstallController->_getDBConfigFileContents($db_info));
|
||||||
FileHandler::writeFile($config_file, $buff);
|
|
||||||
|
|
||||||
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON')))
|
if(!in_array(Context::getRequestMethod(), array('XMLRPC','JSON')))
|
||||||
{
|
{
|
||||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'act', 'dispAdminConfigGeneral');
|
$returnUrl = Context::get('success_return_url');
|
||||||
header('location:'.$returnUrl);
|
if(!$returnUrl) $returnUrl = getNotEncodedUrl('', 'act', 'dispAdminConfigGeneral');
|
||||||
|
header('location:' . $returnUrl);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue