mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-22 05:15:29 +09:00
Migrate miscellaneous config to new format
This commit is contained in:
parent
d41516349c
commit
4ea9ab02ec
2 changed files with 13 additions and 13 deletions
|
|
@ -237,7 +237,7 @@ class Context
|
||||||
$this->loadDBInfo();
|
$this->loadDBInfo();
|
||||||
|
|
||||||
// If the site is locked, display the locked page.
|
// If the site is locked, display the locked page.
|
||||||
if(Rhymix\Framework\Config::get('lock.locked'))
|
if(config('lock.locked'))
|
||||||
{
|
{
|
||||||
self::enforceSiteLock();
|
self::enforceSiteLock();
|
||||||
}
|
}
|
||||||
|
|
@ -301,7 +301,7 @@ class Context
|
||||||
$this->lang->loadDirectory(RX_BASEDIR . 'modules/module/lang', 'module');
|
$this->lang->loadDirectory(RX_BASEDIR . 'modules/module/lang', 'module');
|
||||||
|
|
||||||
// set session handler
|
// set session handler
|
||||||
if(self::isInstalled() && $this->db_info->use_db_session == 'Y')
|
if(self::isInstalled() && config('session.use_db'))
|
||||||
{
|
{
|
||||||
$oSessionModel = getModel('session');
|
$oSessionModel = getModel('session');
|
||||||
$oSessionController = getController('session');
|
$oSessionController = getController('session');
|
||||||
|
|
@ -322,7 +322,7 @@ class Context
|
||||||
$session_id = $_COOKIE[$session_name];
|
$session_id = $_COOKIE[$session_name];
|
||||||
}
|
}
|
||||||
|
|
||||||
if($session_id !== NULL || $this->db_info->delay_session != 'Y')
|
if($session_id !== NULL || !config('session.delay'))
|
||||||
{
|
{
|
||||||
$this->setCacheControl(0, false);
|
$this->setCacheControl(0, false);
|
||||||
session_start();
|
session_start();
|
||||||
|
|
@ -557,7 +557,7 @@ class Context
|
||||||
*/
|
*/
|
||||||
public static function getSslStatus()
|
public static function getSslStatus()
|
||||||
{
|
{
|
||||||
return Rhymix\Framework\Config::get('url.ssl');
|
return config('url.ssl');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -567,7 +567,7 @@ class Context
|
||||||
*/
|
*/
|
||||||
public static function getDefaultUrl()
|
public static function getDefaultUrl()
|
||||||
{
|
{
|
||||||
return Rhymix\Framework\Config::get('url.default');
|
return config('url.default');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -615,7 +615,7 @@ class Context
|
||||||
public function checkSSO()
|
public function checkSSO()
|
||||||
{
|
{
|
||||||
// pass if it's not GET request or XE is not yet installed
|
// pass if it's not GET request or XE is not yet installed
|
||||||
if($this->db_info->use_sso != 'Y' || isCrawler())
|
if(!config('use_sso') || isCrawler())
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
@ -1382,7 +1382,7 @@ class Context
|
||||||
*/
|
*/
|
||||||
private static function enforceSiteLock()
|
private static function enforceSiteLock()
|
||||||
{
|
{
|
||||||
$allowed_list = Rhymix\Framework\Config::get('lock.allow');
|
$allowed_list = config('lock.allow');
|
||||||
foreach ($allowed_list as $allowed_ip)
|
foreach ($allowed_list as $allowed_ip)
|
||||||
{
|
{
|
||||||
if (Rhymix\Framework\IpFilter::inRange(RX_CLIENT_IP, $allowed_ip))
|
if (Rhymix\Framework\IpFilter::inRange(RX_CLIENT_IP, $allowed_ip))
|
||||||
|
|
@ -1392,8 +1392,8 @@ class Context
|
||||||
}
|
}
|
||||||
|
|
||||||
define('_XE_SITELOCK_', TRUE);
|
define('_XE_SITELOCK_', TRUE);
|
||||||
define('_XE_SITELOCK_TITLE_', Rhymix\Framework\Config::get('lock.title'));
|
define('_XE_SITELOCK_TITLE_', config('lock.title'));
|
||||||
define('_XE_SITELOCK_MESSAGE_', Rhymix\Framework\Config::get('lock.message'));
|
define('_XE_SITELOCK_MESSAGE_', config('lock.message'));
|
||||||
|
|
||||||
header("HTTP/1.1 403 Forbidden");
|
header("HTTP/1.1 403 Forbidden");
|
||||||
if(FileHandler::exists(RX_BASEDIR . 'common/tpl/sitelock.user.html'))
|
if(FileHandler::exists(RX_BASEDIR . 'common/tpl/sitelock.user.html'))
|
||||||
|
|
@ -2417,7 +2417,7 @@ class Context
|
||||||
*/
|
*/
|
||||||
public static function isInstalled()
|
public static function isInstalled()
|
||||||
{
|
{
|
||||||
return Rhymix\Framework\Config::get('config_version');
|
return (bool)config('config_version');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -50,9 +50,9 @@ class Mobile
|
||||||
{
|
{
|
||||||
return $this->ismobile;
|
return $this->ismobile;
|
||||||
}
|
}
|
||||||
if(Mobile::isMobileEnabled() === false || Context::get('full_browse') || $_COOKIE["FullBrowse"])
|
if(!config('use_mobile_view') || Context::get('full_browse') || $_COOKIE["FullBrowse"])
|
||||||
{
|
{
|
||||||
return ($this->ismobile = false);
|
return $this->ismobile = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$xe_web_path = Context::pathToUrl(_XE_PATH_);
|
$xe_web_path = Context::pathToUrl(_XE_PATH_);
|
||||||
|
|
@ -231,6 +231,6 @@ class Mobile
|
||||||
|
|
||||||
public static function isMobileEnabled()
|
public static function isMobileEnabled()
|
||||||
{
|
{
|
||||||
return (Context::getDBInfo()->use_mobile_view === 'Y');
|
return config('use_mobile_view');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue