mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 10:11:38 +09:00
Fix #1782 incorrect handling of old member agreement files
- 새 형식으로 저장된 약관이 없는 경우에만 기존 파일 불러오기 - 새 형식으로 약관을 저장하면 기존 파일은 모두 삭제
This commit is contained in:
parent
ca5eb517cf
commit
74bb65a240
2 changed files with 22 additions and 2 deletions
|
|
@ -338,6 +338,20 @@ class memberAdminController extends member
|
|||
|
||||
$oModuleController = getController('module');
|
||||
$output = $oModuleController->updateModuleConfig('member', $config);
|
||||
if (!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
// Delete old agreement files.
|
||||
foreach (Context::loadLangSupported() as $key => $val)
|
||||
{
|
||||
$agreement_file = RX_BASEDIR . 'files/member_extra_info/agreement_' . $key . '.txt';
|
||||
if (Rhymix\Framework\Storage::exists($agreement_file))
|
||||
{
|
||||
Rhymix\Framework\Storage::delete($agreement_file);
|
||||
}
|
||||
}
|
||||
|
||||
// default setting end
|
||||
$this->setMessage('success_updated');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue