diff --git a/classes/module/ModuleObject.class.php b/classes/module/ModuleObject.class.php index 84bfaba96..2ce21b7d0 100644 --- a/classes/module/ModuleObject.class.php +++ b/classes/module/ModuleObject.class.php @@ -91,12 +91,6 @@ class ModuleObject extends BaseObject $obj->user = Rhymix\Framework\Session::getMemberInfo(); } - // Load language files. - if($module !== 'module') - { - Context::loadLang($module_path . 'lang'); - } - // Return the instance. return $GLOBALS['_module_instances_'][$class_name] = $obj; } diff --git a/common/autoload.php b/common/autoload.php index 571387259..9ce12432d 100644 --- a/common/autoload.php +++ b/common/autoload.php @@ -93,10 +93,15 @@ $GLOBALS['RX_AUTOLOAD_FILE_MAP'] = array_change_key_case(array( spl_autoload_register(function($class_name) { $filename = false; + $langpath = false; $lc_class_name = str_replace('\\', '/', strtolower($class_name)); if (preg_match('!^rhymix/(framework|addons|modules|plugins)/(.+)$!', $lc_class_name, $matches)) { $filename = RX_BASEDIR . ($matches[1] === 'framework' ? 'common/framework' : $matches[1]) . '/' . $matches[2] . '.php'; + if ($matches[1] !== 'framework') + { + $langpath = RX_BASEDIR . $matches[1] . '/lang'; + } } elseif (isset($GLOBALS['RX_AUTOLOAD_FILE_MAP'][$lc_class_name])) { @@ -104,14 +109,22 @@ spl_autoload_register(function($class_name) } elseif (preg_match('/^([a-zA-Z0-9_]+?)(Admin)?(View|Controller|Model|Item|Api|Wap|Mobile)?$/', $class_name, $matches)) { - $filename = RX_BASEDIR . 'modules/' . strtolower($matches[1] . '/' . $matches[1]); - if (isset($matches[2]) && $matches[2]) $filename .= '.admin'; - $filename .= (isset($matches[3]) && $matches[3]) ? ('.' . strtolower($matches[3])) : '.class'; - $filename .= '.php'; + $module = strtolower($matches[1]); + $filename = RX_BASEDIR . 'modules/' . $module . '/' . $module . + (!empty($matches[2]) ? '.admin' : '') . + (!empty($matches[3]) ? ('.' . strtolower($matches[3])) : '.class') . '.php'; + if ($module !== 'module') + { + $langpath = RX_BASEDIR . 'modules/' . $module . '/lang'; + } } if ($filename && file_exists($filename)) { include $filename; + if ($langpath) + { + Context::loadLang($langpath); + } } }); diff --git a/modules/member/member.model.php b/modules/member/member.model.php index 5a302ffbf..9029417ec 100644 --- a/modules/member/member.model.php +++ b/modules/member/member.model.php @@ -134,8 +134,7 @@ class memberModel extends member { if($value->isDefaultForm && empty($value->isCustomTitle)) { - $title = in_array($value->name, ['signature', 'profile_image', 'image_name', 'image_mark']) ? 'member.' . $value->name : $value->name; - $config->signupForm[$key]->title = lang($title); + $config->signupForm[$key]->title = lang($value->name); } $config->signupForm[$key]->isPublic = $config->signupForm[$key]->isPublic ?? 'Y'; } diff --git a/modules/member/tpl/signup_config.html b/modules/member/tpl/signup_config.html index b94269295..91d5531e3 100644 --- a/modules/member/tpl/signup_config.html +++ b/modules/member/tpl/signup_config.html @@ -21,7 +21,7 @@
{$lang->unit_day} - +

{$lang->about_limit_day}

@@ -122,9 +122,9 @@
- + - {$item->title} + {$item->title}