git-svn-id: http://xe-core.googlecode.com/svn/trunk@864 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-04-02 02:36:58 +00:00
parent 5a2be2d812
commit 35b9bb8fd2
28 changed files with 186 additions and 485 deletions

View file

@ -35,8 +35,7 @@
if(!$args->document_srl || (!$args->title && !$args->content)) return new Object(0,'');
// 저장
$oDB = &DB::getInstance();
$output = $oDB->executeQuery('editor.insertSavedDoc', $args);
$output = executeQuery('editor.insertSavedDoc', $args);
$this->setMessage('msg_auto_saved');
}
@ -73,9 +72,7 @@
function procEditorAdminEnableComponent() {
$args->component_name = Context::get('component_name');
$args->enabled = 'Y';
$oDB = &DB::getInstance();
$output = $oDB->executeQuery('editor.updateComponent', $args);
$output = executeQuery('editor.updateComponent', $args);
if(!$output->toBool()) return $output;
$this->setMessage('success_updated');
@ -87,9 +84,7 @@
function procEditorAdminDisableComponent() {
$args->component_name = Context::get('component_name');
$args->enabled = 'N';
$oDB = &DB::getInstance();
$output = $oDB->executeQuery('editor.updateComponent', $args);
$output = executeQuery('editor.updateComponent', $args);
if(!$output->toBool()) return $output;
$this->setMessage('success_updated');
@ -103,8 +98,7 @@
$mode = Context::get('mode');
// DB에서 전체 목록 가져옴
$oDB = &DB::getInstance();
$output = $oDB->executeQuery('editor.getComponentList', $args);
$output = executeQuery('editor.getComponentList', $args);
$db_list = $output->data;
foreach($db_list as $key => $val) {
if($val->component_name == $args->component_name) break;
@ -115,21 +109,21 @@
$prev_args->component_name = $db_list[$key-1]->component_name;
$prev_args->list_order = $db_list[$key]->list_order;
$oDB->executeQuery('editor.updateComponent', $prev_args);
executeQuery('editor.updateComponent', $prev_args);
$cur_args->component_name = $db_list[$key]->component_name;
$cur_args->list_order = $db_list[$key-1]->list_order;
$oDB->executeQuery('editor.updateComponent', $cur_args);
executeQuery('editor.updateComponent', $cur_args);
} else {
if($key == count($db_list)-1) return new Object(-1,'msg_component_is_last_order');
$next_args->component_name = $db_list[$key+1]->component_name;
$next_args->list_order = $db_list[$key]->list_order;
$oDB->executeQuery('editor.updateComponent', $next_args);
executeQuery('editor.updateComponent', $next_args);
$cur_args->component_name = $db_list[$key]->component_name;
$cur_args->list_order = $db_list[$key+1]->list_order;
$oDB->executeQuery('editor.updateComponent', $cur_args);
executeQuery('editor.updateComponent', $cur_args);
}
$this->setMessage('success_updated');
@ -148,8 +142,7 @@
$args->component_name = $component_name;
$args->extra_vars = serialize($extra_vars);
$oDB = &DB::getInstance();
$output = $oDB->executeQuery('editor.updateComponent', $args);
$output = executeQuery('editor.updateComponent', $args);
if(!$output->toBool()) return $output;
$this->setMessage('success_updated');
@ -168,8 +161,7 @@
}
// 일단 이전 저장본 삭제
$oDB = &DB::getInstance();
$oDB->executeQuery('editor.deleteSavedDoc', $args);
executeQuery('editor.deleteSavedDoc', $args);
}
/**
@ -179,18 +171,16 @@
if($enabled) $enabled = 'Y';
else $enabled = 'N';
$oDB = &DB::getInstance();
$args->component_name = $component_name;
$args->enabled = $enabled;
// 컴포넌트가 있는지 확인
$output = $oDB->executeQuery('editor.isComponentInserted', $args);
$output = executeQuery('editor.isComponentInserted', $args);
if($output->data->count) return new Object(-1, 'msg_component_is_not_founded');
// 입력
$args->list_order = $oDB->getNextSequence();
$output = $oDB->executeQuery('editor.insertComponent', $args);
$args->list_order = getNextSequence();
$output = executeQuery('editor.insertComponent', $args);
return $output;
}
}

View file

@ -58,8 +58,7 @@
$auto_save_args->ipaddress = $_SERVER['REMOTE_ADDR'];
}
$oDB = &DB::getInstance();
$output = $oDB->executeQuery('editor.getSavedDocument', $auto_save_args);
$output = executeQuery('editor.getSavedDocument', $auto_save_args);
$saved_doc = $output->data;
if(!$saved_doc) return;
@ -103,9 +102,7 @@
function getComponentList($filter_enabled = true) {
if($filter_enabled) $args->enabled = "Y";
// DB에서 가져옴
$oDB = &DB::getInstance();
$output = $oDB->executeQuery('editor.getComponentList', $args);
$output = executeQuery('editor.getComponentList', $args);
$db_list = $output->data;
// 파일목록을 구함
@ -164,9 +161,7 @@
function getComponent($component_name) {
$args->component_name = $component_name;
// DB에서 가져옴
$oDB = &DB::getInstance();
$output = $oDB->executeQuery('editor.getComponent', $args);
$output = executeQuery('editor.getComponent', $args);
$component = $output->data;
$component_name = $component->component_name;