Set editor_mid automatically based on module_srl

This commit is contained in:
Kijin Sung 2023-11-03 16:42:56 +09:00
parent e1cfb09652
commit 990343d906
5 changed files with 7 additions and 29 deletions

View file

@ -439,9 +439,7 @@ class MemberAdminView extends Member
}
if ($option->allow_fileupload)
{
$oMemberView = MemberView::getInstance();
$option->module_srl = $oMemberView->getMemberModuleSrl();
$option->mid = $oMemberView->getMemberModulePrefix();
$option->module_srl = MemberView::getInstance()->getMemberModuleSrl();
}
Context::set('editor', getModel('editor')->getEditor($member_info->member_srl, $option));

View file

@ -93,26 +93,6 @@ class MemberView extends Member
return false;
}
/**
* Get the member mid (prefix)
*
* @return string
*/
public function getMemberModulePrefix(): string
{
if (!$this->member_config)
{
$this->member_config = MemberModel::getMemberConfig();
}
if (!empty($this->member_config->mid))
{
return $this->member_config->mid;
}
else
{
return '';
}
}
/**
* Get the module_srl for the member mid.
*
@ -378,7 +358,6 @@ class MemberView extends Member
if ($option->allow_fileupload)
{
$option->module_srl = $this->getMemberModuleSrl();
$option->mid = $this->getMemberModulePrefix();
}
Context::set('editor', getModel('editor')->getEditor(0, $option));
@ -497,7 +476,6 @@ class MemberView extends Member
if ($option->allow_fileupload)
{
$option->module_srl = $this->getMemberModuleSrl();
$option->mid = $this->getMemberModulePrefix();
}
Context::set('editor', getModel('editor')->getEditor($member_info->member_srl, $option));