mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Remove remaining references to getDBInfo()
This commit is contained in:
parent
9895699591
commit
f7aad28d2c
12 changed files with 25 additions and 53 deletions
|
|
@ -136,7 +136,7 @@ class ModuleHandler extends Handler
|
||||||
$urlInfo = parse_url($url);
|
$urlInfo = parse_url($url);
|
||||||
$host = $urlInfo['host'];
|
$host = $urlInfo['host'];
|
||||||
|
|
||||||
$defaultUrl = Context::getDBInfo()->default_url;
|
$defaultUrl = Context::getDefaultUrl();
|
||||||
if($defaultUrl)
|
if($defaultUrl)
|
||||||
{
|
{
|
||||||
$defaultUrlInfo = parse_url($defaultUrl);
|
$defaultUrlInfo = parse_url($defaultUrl);
|
||||||
|
|
@ -240,8 +240,7 @@ class ModuleHandler extends Handler
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$db_info = Context::getDBInfo();
|
if(!Context::getDefaultUrl())
|
||||||
if(!$db_info->default_url)
|
|
||||||
{
|
{
|
||||||
return Context::getLang('msg_default_url_is_not_defined');
|
return Context::getLang('msg_default_url_is_not_defined');
|
||||||
}
|
}
|
||||||
|
|
@ -250,7 +249,7 @@ class ModuleHandler extends Handler
|
||||||
$redirect_url = getNotEncodedSiteUrl($db_info->default_url, 'mid', Context::get('mid'), 'document_srl', Context::get('document_srl'), 'module_srl', Context::get('module_srl'), 'entry', Context::get('entry'));
|
$redirect_url = getNotEncodedSiteUrl($db_info->default_url, 'mid', Context::get('mid'), 'document_srl', Context::get('document_srl'), 'module_srl', Context::get('module_srl'), 'entry', Context::get('entry'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
header("location:" . $redirect_url);
|
header("Location: $redirect_url");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -394,18 +394,16 @@ class EmbedFilter
|
||||||
{
|
{
|
||||||
$this->whiteIframeUrlList[] = $prefix;
|
$this->whiteIframeUrlList[] = $prefix;
|
||||||
}
|
}
|
||||||
|
if ($embedfilter_object = config('embedfilter.object'))
|
||||||
$db_info = Context::getDBInfo();
|
|
||||||
if(isset($db_info->embed_white_object) && count($db_info->embed_white_object))
|
|
||||||
{
|
{
|
||||||
foreach ($db_info->embed_white_object as $prefix)
|
foreach ($embedfilter_object as $prefix)
|
||||||
{
|
{
|
||||||
$this->whiteUrlList[] = preg_match('@^https?://(.*)$@i', $prefix, $matches) ? $matches[1] : $prefix;
|
$this->whiteUrlList[] = preg_match('@^https?://(.*)$@i', $prefix, $matches) ? $matches[1] : $prefix;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(isset($db_info->embed_white_iframe) && count($db_info->embed_white_iframe))
|
if ($embedfilter_iframe = config('embedfilter.iframe'))
|
||||||
{
|
{
|
||||||
foreach ($db_info->embed_white_iframe as $prefix)
|
foreach ($embedfilter_iframe as $prefix)
|
||||||
{
|
{
|
||||||
$this->whiteIframeUrlList[] = preg_match('@^https?://(.*)$@i', $prefix, $matches) ? $matches[1] : $prefix;
|
$this->whiteIframeUrlList[] = preg_match('@^https?://(.*)$@i', $prefix, $matches) ? $matches[1] : $prefix;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -401,7 +401,6 @@ class adminAdminModel extends admin
|
||||||
, 'widgetstyle' => array(),
|
, 'widgetstyle' => array(),
|
||||||
);
|
);
|
||||||
$info = array();
|
$info = array();
|
||||||
$db_info = Context::getDBInfo();
|
|
||||||
|
|
||||||
$info['type'] = ($type != 'INSTALL' ? 'WORKING' : 'INSTALL');
|
$info['type'] = ($type != 'INSTALL' ? 'WORKING' : 'INSTALL');
|
||||||
$info['location'] = _XE_LOCATION_;
|
$info['location'] = _XE_LOCATION_;
|
||||||
|
|
@ -412,9 +411,9 @@ class adminAdminModel extends admin
|
||||||
$info['php'] = phpversion();
|
$info['php'] = phpversion();
|
||||||
|
|
||||||
$info['db_type'] = Context::getDBType();
|
$info['db_type'] = Context::getDBType();
|
||||||
$info['use_rewrite'] = $db_info->use_rewrite;
|
$info['use_rewrite'] = config('use_rewrite') ? 'Y' : 'N';
|
||||||
$info['use_db_session'] = $db_info->use_db_session == 'Y' ? 'Y' : 'N';
|
$info['use_db_session'] = config('session.use_db') ? 'Y' : 'N';
|
||||||
$info['use_ssl'] = $db_info->use_ssl;
|
$info['use_ssl'] = config('url.ssl') ?: 'none';
|
||||||
|
|
||||||
$info['phpext'] = '';
|
$info['phpext'] = '';
|
||||||
foreach(get_loaded_extensions() as $ext)
|
foreach(get_loaded_extensions() as $ext)
|
||||||
|
|
|
||||||
|
|
@ -26,17 +26,7 @@ class adminAdminView extends admin
|
||||||
|
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
$db_info = Context::getDBInfo();
|
Context::set('xe_default_url', Context::getDefaultUrl());
|
||||||
|
|
||||||
if(strpos($db_info->default_url, 'xn--') !== FALSE)
|
|
||||||
{
|
|
||||||
$xe_default_url = Context::decodeIdna($db_info->default_url);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$xe_default_url = $db_info->default_url;
|
|
||||||
}
|
|
||||||
Context::set('xe_default_url', $xe_default_url);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -238,9 +228,6 @@ class adminAdminView extends admin
|
||||||
*/
|
*/
|
||||||
function dispAdminIndex()
|
function dispAdminIndex()
|
||||||
{
|
{
|
||||||
$db_info = Context::getDBInfo();
|
|
||||||
Context::set('db_info',$db_info);
|
|
||||||
|
|
||||||
// Get statistics
|
// Get statistics
|
||||||
$args = new stdClass();
|
$args = new stdClass();
|
||||||
$args->date = date("Ymd000000", $_SERVER['REQUEST_TIME'] - 60 * 60 * 24);
|
$args->date = date("Ymd000000", $_SERVER['REQUEST_TIME'] - 60 * 60 * 24);
|
||||||
|
|
@ -410,7 +397,7 @@ class adminAdminView extends admin
|
||||||
Context::set('selected_timezone', Rhymix\Framework\Config::get('locale.default_timezone'));
|
Context::set('selected_timezone', Rhymix\Framework\Config::get('locale.default_timezone'));
|
||||||
|
|
||||||
// Mobile view
|
// Mobile view
|
||||||
Context::set('use_mobile_view', $db_info->use_mobile_view == 'Y' ? 'Y' : 'N');
|
Context::set('use_mobile_view', config('use_mobile_view') ? 'Y' : 'N');
|
||||||
|
|
||||||
// Favicon and mobicon
|
// Favicon and mobicon
|
||||||
$oAdminModel = getAdminModel('admin');
|
$oAdminModel = getAdminModel('admin');
|
||||||
|
|
|
||||||
|
|
@ -208,9 +208,8 @@ class document extends ModuleObject
|
||||||
// 2009. 03. 09 Add a column(lang_code) to the documnets table
|
// 2009. 03. 09 Add a column(lang_code) to the documnets table
|
||||||
if(!$oDB->isColumnExists("documents","lang_code"))
|
if(!$oDB->isColumnExists("documents","lang_code"))
|
||||||
{
|
{
|
||||||
$db_info = Context::getDBInfo();
|
$oDB->addColumn('documents',"lang_code","varchar",10, config('locale.default_lang'));
|
||||||
$oDB->addColumn('documents',"lang_code","varchar",10, $db_info->lang_code);
|
$obj->lang_code = config('locale.default_lang');
|
||||||
$obj->lang_code = $db_info->lang_type;
|
|
||||||
executeQuery('document.updateDocumentsLangCode', $obj);
|
executeQuery('document.updateDocumentsLangCode', $obj);
|
||||||
}
|
}
|
||||||
// 2009. 03. 11 Check the index in the document_extra_vars table
|
// 2009. 03. 11 Check the index in the document_extra_vars table
|
||||||
|
|
|
||||||
|
|
@ -107,8 +107,7 @@ class importerAdminController extends importer
|
||||||
|
|
||||||
/* DBMS가 CUBRID인 경우 MySQL과 동일한 방법으로는 문서 및 댓글에 대한 사용자 정보를 동기화 할 수 없으므로 예외 처리 합니다.
|
/* DBMS가 CUBRID인 경우 MySQL과 동일한 방법으로는 문서 및 댓글에 대한 사용자 정보를 동기화 할 수 없으므로 예외 처리 합니다.
|
||||||
CUBRID를 사용하지 않는 경우에만 보편적인 기존 질의문을 사용합니다. */
|
CUBRID를 사용하지 않는 경우에만 보편적인 기존 질의문을 사용합니다. */
|
||||||
$db_info = Context::getDBInfo ();
|
if(config('db.master.type') !== 'cubrid')
|
||||||
if($db_info->db_type != "cubrid")
|
|
||||||
{
|
{
|
||||||
$output = executeQuery('importer.updateDocumentSync'.$postFix);
|
$output = executeQuery('importer.updateDocumentSync'.$postFix);
|
||||||
$output = executeQuery('importer.updateCommentSync'.$postFix);
|
$output = executeQuery('importer.updateCommentSync'.$postFix);
|
||||||
|
|
|
||||||
|
|
@ -296,10 +296,8 @@ class memberAdminModel extends member
|
||||||
*/
|
*/
|
||||||
function getMemberAdminIPCheck()
|
function getMemberAdminIPCheck()
|
||||||
{
|
{
|
||||||
$db_info = Context::getDBInfo();
|
$admin_ip_list = config('admin.allow');
|
||||||
$admin_ip_list = $db_info->admin_ip_list;
|
|
||||||
if(!$admin_ip_list) return true;
|
if(!$admin_ip_list) return true;
|
||||||
if(!is_array($admin_ip_list)) $admin_ip_list = explode(',',$admin_ip_list);
|
|
||||||
if(!count($admin_ip_list) || IpFilter::filter($admin_ip_list)) return true;
|
if(!count($admin_ip_list) || IpFilter::filter($admin_ip_list)) return true;
|
||||||
else return false;
|
else return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -92,8 +92,7 @@ class memberModel extends member
|
||||||
return FileHandler::readFile($agreement_file);
|
return FileHandler::readFile($agreement_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
$db_info = Context::getDBInfo();
|
$agreement_file = _XE_PATH_.'files/member_extra_info/agreement_' . config('locale.default_lang') . '.txt';
|
||||||
$agreement_file = _XE_PATH_.'files/member_extra_info/agreement_' . $db_info->lang_type . '.txt';
|
|
||||||
if(is_readable($agreement_file))
|
if(is_readable($agreement_file))
|
||||||
{
|
{
|
||||||
return FileHandler::readFile($agreement_file);
|
return FileHandler::readFile($agreement_file);
|
||||||
|
|
@ -295,8 +294,7 @@ class memberModel extends member
|
||||||
|
|
||||||
$args = new stdClass();
|
$args = new stdClass();
|
||||||
|
|
||||||
$db_info = Context::getDBInfo ();
|
if(config('db.master.type') == 'cubrid')
|
||||||
if($db_info->master_db['db_type'] == "cubrid")
|
|
||||||
{
|
{
|
||||||
$args->email_address = strtolower($email_address);
|
$args->email_address = strtolower($email_address);
|
||||||
$output = executeQuery('member.getMemberInfoByEmailAddressForCubrid', $args);
|
$output = executeQuery('member.getMemberInfoByEmailAddressForCubrid', $args);
|
||||||
|
|
|
||||||
|
|
@ -1608,7 +1608,6 @@ class menuAdminController extends menu
|
||||||
$url = getNotEncodedFullUrl('', 'module', 'admin', 'act', $info->menu->{$menuName}->index);
|
$url = getNotEncodedFullUrl('', 'module', 'admin', 'act', $info->menu->{$menuName}->index);
|
||||||
if(empty($url)) $url = getNotEncodedFullUrl('', 'module', 'admin', 'act', $info->admin_index_act);
|
if(empty($url)) $url = getNotEncodedFullUrl('', 'module', 'admin', 'act', $info->admin_index_act);
|
||||||
if(empty($url)) $url = getNotEncodedFullUrl('', 'module', 'admin');
|
if(empty($url)) $url = getNotEncodedFullUrl('', 'module', 'admin');
|
||||||
$dbInfo = Context::getDBInfo();
|
|
||||||
|
|
||||||
$args = new stdClass();
|
$args = new stdClass();
|
||||||
$args->menu_item_srl = (!$requestArgs->menu_item_srl) ? getNextSequence() : $requestArgs->menu_item_srl;
|
$args->menu_item_srl = (!$requestArgs->menu_item_srl) ? getNextSequence() : $requestArgs->menu_item_srl;
|
||||||
|
|
@ -1618,11 +1617,11 @@ class menuAdminController extends menu
|
||||||
//if now page is https...
|
//if now page is https...
|
||||||
if(strpos($url, 'https') !== false)
|
if(strpos($url, 'https') !== false)
|
||||||
{
|
{
|
||||||
$args->url = str_replace('https'.substr($dbInfo->default_url, 4), '', $url);
|
$args->url = str_replace('https'.substr(Context::getDefaultUrl(), 4), '', $url);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$args->url = str_replace($dbInfo->default_url, '', $url);
|
$args->url = str_replace(Context::getDefaultUrl(), '', $url);
|
||||||
}
|
}
|
||||||
$args->open_window = 'N';
|
$args->open_window = 'N';
|
||||||
$args->expand = 'N';
|
$args->expand = 'N';
|
||||||
|
|
|
||||||
|
|
@ -868,9 +868,8 @@ class moduleAdminController extends module
|
||||||
$langMap[$val->lang_code][$val->name] = $val->value;
|
$langMap[$val->lang_code][$val->name] = $val->value;
|
||||||
}
|
}
|
||||||
|
|
||||||
$lang_supported = Context::get('lang_supported');
|
$lang_supported = Context::loadLangSelected();
|
||||||
$dbInfo = Context::getDBInfo();
|
$defaultLang = config('locale.default_lang');
|
||||||
$defaultLang = $dbInfo->lang_type;
|
|
||||||
|
|
||||||
if(!is_array($langMap[$defaultLang]))
|
if(!is_array($langMap[$defaultLang]))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ class module extends ModuleObject
|
||||||
$output = $oDB->executeQuery('module.getSite', $args);
|
$output = $oDB->executeQuery('module.getSite', $args);
|
||||||
if(!$output->data || !$output->data->index_module_srl)
|
if(!$output->data || !$output->data->index_module_srl)
|
||||||
{
|
{
|
||||||
$db_info = Context::getDBInfo();
|
|
||||||
$domain = Context::getDefaultUrl();
|
$domain = Context::getDefaultUrl();
|
||||||
$url_info = parse_url($domain);
|
$url_info = parse_url($domain);
|
||||||
$domain = $url_info['host'].( (!empty($url_info['port'])&&$url_info['port']!=80)?':'.$url_info['port']:'').$url_info['path'];
|
$domain = $url_info['host'].( (!empty($url_info['port'])&&$url_info['port']!=80)?':'.$url_info['port']:'').$url_info['path'];
|
||||||
|
|
@ -38,7 +37,7 @@ class module extends ModuleObject
|
||||||
$site_args->site_srl = 0;
|
$site_args->site_srl = 0;
|
||||||
$site_args->index_module_srl = 0;
|
$site_args->index_module_srl = 0;
|
||||||
$site_args->domain = $domain;
|
$site_args->domain = $domain;
|
||||||
$site_args->default_language = $db_info->lang_type;
|
$site_args->default_language = config('locale.default_lang');
|
||||||
|
|
||||||
$output = executeQuery('module.insertSite', $site_args);
|
$output = executeQuery('module.insertSite', $site_args);
|
||||||
if(!$output->toBool()) return $output;
|
if(!$output->toBool()) return $output;
|
||||||
|
|
@ -328,14 +327,13 @@ class module extends ModuleObject
|
||||||
{
|
{
|
||||||
// Basic mid, language Wanted
|
// Basic mid, language Wanted
|
||||||
$mid_output = $oDB->executeQuery('module.getDefaultMidInfo', $args);
|
$mid_output = $oDB->executeQuery('module.getDefaultMidInfo', $args);
|
||||||
$db_info = Context::getDBInfo();
|
|
||||||
$domain = Context::getDefaultUrl();
|
$domain = Context::getDefaultUrl();
|
||||||
$url_info = parse_url($domain);
|
$url_info = parse_url($domain);
|
||||||
$domain = $url_info['host'].( (!empty($url_info['port'])&&$url_info['port']!=80)?':'.$url_info['port']:'').$url_info['path'];
|
$domain = $url_info['host'].( (!empty($url_info['port'])&&$url_info['port']!=80)?':'.$url_info['port']:'').$url_info['path'];
|
||||||
$site_args->site_srl = 0;
|
$site_args->site_srl = 0;
|
||||||
$site_args->index_module_srl = $mid_output->data->module_srl;
|
$site_args->index_module_srl = $mid_output->data->module_srl;
|
||||||
$site_args->domain = $domain;
|
$site_args->domain = $domain;
|
||||||
$site_args->default_language = $db_info->lang_type;
|
$site_args->default_language = config('locale.default_lang');
|
||||||
|
|
||||||
$output = executeQuery('module.insertSite', $site_args);
|
$output = executeQuery('module.insertSite', $site_args);
|
||||||
if(!$output->toBool()) return $output;
|
if(!$output->toBool()) return $output;
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,6 @@ class moduleModel extends module
|
||||||
|
|
||||||
// Get mid, language
|
// Get mid, language
|
||||||
$mid_output = $oDB->executeQuery('module.getDefaultMidInfo', $args);
|
$mid_output = $oDB->executeQuery('module.getDefaultMidInfo', $args);
|
||||||
$db_info = Context::getDBInfo();
|
|
||||||
$domain = Context::getDefaultUrl();
|
$domain = Context::getDefaultUrl();
|
||||||
$url_info = parse_url($domain);
|
$url_info = parse_url($domain);
|
||||||
$domain = $url_info['host'].( (!empty($url_info['port'])&&$url_info['port']!=80)?':'.$url_info['port']:'').$url_info['path'];
|
$domain = $url_info['host'].( (!empty($url_info['port'])&&$url_info['port']!=80)?':'.$url_info['port']:'').$url_info['path'];
|
||||||
|
|
@ -180,7 +179,7 @@ class moduleModel extends module
|
||||||
$site_args->site_srl = 0;
|
$site_args->site_srl = 0;
|
||||||
$site_args->index_module_srl = $mid_output->data->module_srl;
|
$site_args->index_module_srl = $mid_output->data->module_srl;
|
||||||
$site_args->domain = $domain;
|
$site_args->domain = $domain;
|
||||||
$site_args->default_language = $db_info->lang_type;
|
$site_args->default_language = config('locale.default_lang');
|
||||||
|
|
||||||
if($output->data && !$output->data->index_module_srl)
|
if($output->data && !$output->data->index_module_srl)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue