mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Merge branch 'rhymix:master' into master
This commit is contained in:
commit
a40502885e
34 changed files with 259 additions and 140 deletions
|
|
@ -317,13 +317,14 @@ class Context
|
|||
$lang->loadDirectory(RX_BASEDIR . 'common/lang', 'common');
|
||||
$lang->loadDirectory(RX_BASEDIR . 'modules/module/lang', 'module');
|
||||
self::setLangType(self::$_instance->lang_type = $lang_type);
|
||||
self::set('lang', self::$_instance->lang = $lang);
|
||||
|
||||
// Set global variables for backward compatibility.
|
||||
$GLOBALS['oContext'] = self::$_instance;
|
||||
$GLOBALS['__Context__'] = &self::$_user_vars;
|
||||
$GLOBALS['_time_zone'] = config('locale.default_timezone');
|
||||
$GLOBALS['lang'] = &$lang;
|
||||
self::$_user_vars->lang = $lang;
|
||||
self::$_instance->lang = $lang;
|
||||
|
||||
// set session handler
|
||||
if(self::isInstalled() && config('session.use_db'))
|
||||
|
|
@ -1488,9 +1489,18 @@ class Context
|
|||
}
|
||||
foreach($val as $_key => $_val)
|
||||
{
|
||||
if(is_array($_val))
|
||||
if($is_array)
|
||||
{
|
||||
$_val = self::_filterRequestVar($key, $_val);
|
||||
if(in_array($key, array('mid', 'vid', 'act', 'module')))
|
||||
{
|
||||
self::$_instance->security_check = 'DENY ALL';
|
||||
self::$_instance->security_check_detail = 'ERR_UNSAFE_VAR';
|
||||
$_val = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
$_val = self::_filterRequestVar($key, $_val);
|
||||
}
|
||||
}
|
||||
elseif($_val = trim($_val))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ class HTMLDisplayHandler
|
|||
'dispPageAdminMobileContentModify' => true,
|
||||
'dispPageAdminMobileContent' => true,
|
||||
);
|
||||
$current_act = Context::get('act') ?? '';
|
||||
$current_act = strval(Context::get('act'));
|
||||
if(Context::get('module') != 'admin' && strpos($current_act, 'Admin') !== false && !isset($x_exclude_actions[$current_act]))
|
||||
{
|
||||
$output = '<div class="x">' . $output . '</div>';
|
||||
|
|
|
|||
|
|
@ -88,11 +88,11 @@ class ModuleHandler extends Handler
|
|||
|
||||
// Set variables from request arguments
|
||||
$this->method = Context::getRequestMethod();
|
||||
$this->module = $module ? $module : Context::get('module');
|
||||
$this->act = $act ? $act : Context::get('act');
|
||||
$this->mid = $mid ? $mid : Context::get('mid');
|
||||
$this->document_srl = $document_srl ? (int) $document_srl : (int) Context::get('document_srl');
|
||||
$this->module_srl = $module_srl ? (int) $module_srl : (int) Context::get('module_srl');
|
||||
$this->module = strval($module ?: Context::get('module'));
|
||||
$this->act = strval($act ?: Context::get('act'));
|
||||
$this->mid = strval($mid ?: Context::get('mid'));
|
||||
$this->document_srl = intval($document_srl ?: Context::get('document_srl'));
|
||||
$this->module_srl = intval($module_srl ?: Context::get('module_srl'));
|
||||
$this->route = Context::getCurrentRequest() ?: new stdClass;
|
||||
$this->is_mobile = Mobile::isFromMobilePhone();
|
||||
if($entry = Context::get('entry'))
|
||||
|
|
@ -156,7 +156,7 @@ class ModuleHandler extends Handler
|
|||
$urls = array('success_return_url', 'error_return_url');
|
||||
foreach($urls as $key)
|
||||
{
|
||||
$url = Context::get($key);
|
||||
$url = strval(Context::get($key));
|
||||
if ($url && !Rhymix\Framework\URL::isInternalURL($url))
|
||||
{
|
||||
Context::set($key, null);
|
||||
|
|
@ -848,10 +848,15 @@ class ModuleHandler extends Handler
|
|||
$seo_title = config('seo.subpage_title') ?: '$SITE_TITLE - $SUBPAGE_TITLE';
|
||||
}
|
||||
$seo_title = Context::replaceUserLang($seo_title);
|
||||
$subpage_title = $module_info->browser_title;
|
||||
if (in_array($module_info->module, ['member']))
|
||||
{
|
||||
$subpage_title = '';
|
||||
}
|
||||
Context::setBrowserTitle($seo_title, array(
|
||||
'site_title' => Context::getSiteTitle(),
|
||||
'site_subtitle' => Context::getSiteSubtitle(),
|
||||
'subpage_title' => $module_info->browser_title,
|
||||
'subpage_title' => $subpage_title,
|
||||
'page' => Context::get('page') ?: 1,
|
||||
));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue