mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
r17486319 플래닛 모듈이 생성되어 있지 않을 경우 확인하여 생성하도록 하여 플래닛 생성시 이미 등록된 모듈이라는 잘못된 오류 메세지가 나오지 않도록 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4983 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
d408705a9a
commit
9cfe6241aa
2 changed files with 15 additions and 11 deletions
|
|
@ -19,21 +19,32 @@
|
|||
$oPlanetModel = &getModel('planet');
|
||||
$config = $oPlanetModel->getPlanetConfig();
|
||||
|
||||
// 이미 등록된 플래닛의 유무 체크
|
||||
if($config->mid && $oModuleModel->getModuleInfoByMid($config->mid)) {
|
||||
$is_registed = true;
|
||||
} else {
|
||||
$is_registed = false;
|
||||
}
|
||||
|
||||
// mid, browser_title, is_default 값이 바뀌면 처리
|
||||
$config->mid = $args->mid = Context::get('planet_mid');
|
||||
$args->browser_title = Context::get('browser_title');
|
||||
$args->is_default = Context::get('is_default');
|
||||
$args->skin = Context::get('planet_default_skin');
|
||||
|
||||
|
||||
|
||||
$args->module = 'planet';
|
||||
$args->module_srl = $config->module_srl;
|
||||
$args->module_srl = $is_registed?$config->module_srl:getNextSequence();
|
||||
|
||||
if($args->is_default == 'Y') {
|
||||
$output = $oModuleController->clearDefaultModule();
|
||||
if(!$output->toBool()) return $output;
|
||||
}
|
||||
$output = $oModuleController->updateModule($args);
|
||||
|
||||
if($is_registed) {
|
||||
$output = $oModuleController->updateModule($args);
|
||||
} else {
|
||||
$output = $oModuleController->insertModule($args);
|
||||
}
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// 그외 정보 처리
|
||||
|
|
@ -41,7 +52,6 @@
|
|||
$config->use_mobile = Context::get('use_mobile');
|
||||
$config->use_me2day = Context::get('use_me2day');
|
||||
|
||||
|
||||
$tagtab = explode(',',Context::get('planet_tagtab'));
|
||||
for($i=0,$c=count($tagtab);$i<$c;$i++){
|
||||
if(trim($tagtab[$i])) continue;
|
||||
|
|
|
|||
|
|
@ -37,12 +37,6 @@
|
|||
$args->skin = 'xe_planet';
|
||||
$args->is_default = 'N';
|
||||
$args->mid = 'planet';
|
||||
$idx = 0;
|
||||
while(true) {
|
||||
$_o = executeQuery('module.getMidInfo', $args);
|
||||
if(!$_o->data) break;
|
||||
$idx = $idx + 1;
|
||||
}
|
||||
$args->module_srl = getNextSequence();
|
||||
$output = $oModuleController->insertModule($args);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue