mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
#17147582 회원 가입약관을 길게 쓸 경우 회원 설정 내용이 사라지는 오류를 수정.
수정 방법은 가입약관을 별도의 파일로 저장하고 DB에 저장하지 않도록 하여 수정. 가입약관 파일의 위치는 ./files/member_extra_info/agreement.txt 로 지정 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6324 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
ca413d3c90
commit
b729bc68f0
6 changed files with 65 additions and 16 deletions
|
|
@ -109,9 +109,8 @@
|
|||
if(!trim(strip_tags($args->agreement))) $args->agreement = null;
|
||||
$args->limit_day = (int)$args->limit_day;
|
||||
|
||||
// module Controller 객체 생성하여 입력
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('member',$args);
|
||||
$oMemberController = &getController('member');
|
||||
$output = $oMemberController->setMemberConfig($args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -409,7 +408,7 @@
|
|||
$oModuleControll = getController('module');
|
||||
|
||||
$config = $oModuleModel->getModuleConfig('member');
|
||||
// $config->group_image_mark_order = Context::get('group_image_mark_order');
|
||||
// $config->group_image_mark_order = Context::get('group_image_mark_order');
|
||||
|
||||
$oModuleControll->insertModuleConfig('member', $config);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,17 +67,8 @@
|
|||
function dispMemberAdminConfig() {
|
||||
// 설정 정보를 받아옴 (module model 객체를 이용)
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('member');
|
||||
if(!$config->webmaster_name) $config->webmaster_name = 'webmaster';
|
||||
if(!$config->image_name_max_width) $config->image_name_max_width = 90;
|
||||
if(!$config->image_name_max_height) $config->image_name_max_height = 20;
|
||||
if(!$config->image_mark_max_width) $config->image_mark_max_width = 20;
|
||||
if(!$config->image_mark_max_height) $config->image_mark_max_height = 20;
|
||||
if(!$config->profile_image_max_width) $config->profile_image_max_width = 80;
|
||||
if(!$config->profile_image_max_height) $config->profile_image_max_height = 80;
|
||||
if(!$config->skin) $config->skin = "default";
|
||||
if(!$config->editor_skin || $config->editor_skin == 'default') $config->editor_skin = "xpresseditor";
|
||||
if(!$config->group_image_mark) $config->group_image_mark = "N";
|
||||
$oMemberModel = &getModel('member');
|
||||
$config = $oMemberModel->getMemberConfig();
|
||||
Context::set('config',$config);
|
||||
|
||||
// 회원 관리 모듈의 스킨 목록을 구함
|
||||
|
|
|
|||
|
|
@ -195,4 +195,4 @@
|
|||
function recompileCache() {
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1110,6 +1110,36 @@
|
|||
$this->setMessage('success_deleted');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 설정 정보를 저장
|
||||
**/
|
||||
function setMemberConfig($args) {
|
||||
if(!$args->skin) $args->skin = "default";
|
||||
if(!$args->colorset) $args->colorset = "white";
|
||||
if(!$args->editor_skin) $args->editor_skin= "xpresseditor";
|
||||
if(!$args->editor_colorset) $args->editor_colorset = "white";
|
||||
if($args->enable_join!='Y') $args->enable_join = 'N';
|
||||
if($args->enable_openid!='Y') $args->enable_openid= 'N';
|
||||
if($args->profile_image !='Y') $args->profile_image = 'N';
|
||||
if($args->image_name!='Y') $args->image_name = 'N';
|
||||
if($args->image_mark!='Y') $args->image_mark = 'N';
|
||||
if($args->group_image_mark!='Y') $args->group_image_mark = 'N';
|
||||
if(!trim(strip_tags($args->agreement))) $args->agreement = null;
|
||||
$args->limit_day = (int)$args->limit_day;
|
||||
|
||||
$agreement = trim($args->agreement);
|
||||
unset($args->agreement);
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('member',$args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$agreement_file = _XE_PATH_.'files/member_extra_info/agreement.txt';
|
||||
FileHandler::writeFile($agreement_file, $agreement);
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 서명을 파일로 저장
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -18,6 +18,32 @@
|
|||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 설정 정보를 return
|
||||
**/
|
||||
function getMemberConfig() {
|
||||
// DB에 저장되는 회원 설정 정보 구함
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('member');
|
||||
|
||||
// 회원가입 약관 구함
|
||||
$agreement_file = _XE_PATH_.'files/member_extra_info/agreement.txt';
|
||||
if(file_exists($agreement_file)) $config->agreement = FileHandler::readFile($agreement_file);
|
||||
|
||||
if(!$config->webmaster_name) $config->webmaster_name = 'webmaster';
|
||||
if(!$config->image_name_max_width) $config->image_name_max_width = 90;
|
||||
if(!$config->image_name_max_height) $config->image_name_max_height = 20;
|
||||
if(!$config->image_mark_max_width) $config->image_mark_max_width = 20;
|
||||
if(!$config->image_mark_max_height) $config->image_mark_max_height = 20;
|
||||
if(!$config->profile_image_max_width) $config->profile_image_max_width = 80;
|
||||
if(!$config->profile_image_max_height) $config->profile_image_max_height = 80;
|
||||
if(!$config->skin) $config->skin = "default";
|
||||
if(!$config->editor_skin || $config->editor_skin == 'default') $config->editor_skin = "xpresseditor";
|
||||
if(!$config->group_image_mark) $config->group_image_mark = "N";
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 선택된 회원의 간단한 메뉴를 표시
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -76,6 +76,9 @@
|
|||
// 회원가입을 중지시켰을 때는 에러 표시
|
||||
if($this->member_config->enable_join != 'Y') return $this->stop('msg_signup_disabled');
|
||||
Context::set('extend_form_list', $oMemberModel->getCombineJoinForm($member_info));
|
||||
|
||||
$member_config = $oMemberModel->getMemberConfig();
|
||||
Context::set('member_config', $member_config);
|
||||
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('signup_form');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue