mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
코드 정리, 세션 없어서 전송받은 srl참고 할 때 권한 확인
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6540 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
1a6c988db1
commit
4ac4a8cd21
4 changed files with 268 additions and 241 deletions
|
|
@ -218,7 +218,7 @@
|
|||
|
||||
// trigger 호출 (after)
|
||||
if($output->toBool()) {
|
||||
$trigger_output = ModuleHandler::triggerCall('document.insertDocument', 'after', $obj);
|
||||
$trigger_output = ModuleHandler::triggerCall('document.insertDocument', 'after', $obj);
|
||||
if(!$trigger_output->toBool()) {
|
||||
$oDB->rollback();
|
||||
return $trigger_output;
|
||||
|
|
@ -501,7 +501,7 @@
|
|||
return $output;
|
||||
}
|
||||
|
||||
// update category
|
||||
// update category
|
||||
if($oDocument->get('category_srl')) $this->updateCategoryCount($oDocument->get('module_srl'),$oDocument->get('category_srl'));
|
||||
|
||||
// commit
|
||||
|
|
@ -549,7 +549,7 @@
|
|||
**/
|
||||
function insertDocumentExtraKey($module_srl, $var_idx, $var_name, $var_type, $var_is_required = 'N', $var_search = 'N', $var_default = '', $var_desc = '', $eid) {
|
||||
if(!$module_srl || !$var_idx || !$var_name || !$var_type || !$eid) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
|
||||
$obj->module_srl = $module_srl;
|
||||
$obj->var_idx = $var_idx;
|
||||
$obj->var_name = $var_name;
|
||||
|
|
@ -558,14 +558,14 @@
|
|||
$obj->var_search = $var_search=='Y'?'Y':'N';
|
||||
$obj->var_default = $var_default;
|
||||
$obj->var_desc = $var_desc;
|
||||
$obj->eid = $eid;
|
||||
$obj->eid = $eid;
|
||||
|
||||
$output = executeQuery('document.getDocumentExtraKeys', $obj);
|
||||
if(!$output->data) return executeQuery('document.insertDocumentExtraKey', $obj);
|
||||
$output = executeQuery('document.updateDocumentExtraKey', $obj);
|
||||
|
||||
// extra_vars에서 확장 변수 eid를 일괄 업데이트
|
||||
$output = executeQuery('document.updateDocumentExtraVar', $obj);
|
||||
|
||||
// extra_vars에서 확장 변수 eid를 일괄 업데이트
|
||||
$output = executeQuery('document.updateDocumentExtraVar', $obj);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
|
@ -589,13 +589,13 @@
|
|||
function insertDocumentExtraVar($module_srl, $document_srl, $var_idx, $value, $eid = null, $lang_code = '') {
|
||||
if(!$module_srl || !$document_srl || !$var_idx || !isset($value)) return new Object(-1,'msg_invalid_request');
|
||||
if(!$lang_code) $lang_code = Context::getLangType();
|
||||
|
||||
|
||||
$obj->module_srl = $module_srl;
|
||||
$obj->document_srl = $document_srl;
|
||||
$obj->var_idx = $var_idx;
|
||||
$obj->value = $value;
|
||||
$obj->lang_code = $lang_code;
|
||||
$obj->eid = $eid;
|
||||
$obj->eid = $eid;
|
||||
|
||||
executeQuery('document.insertDocumentExtraVar', $obj);
|
||||
}
|
||||
|
|
@ -612,7 +612,7 @@
|
|||
$output = executeQuery('document.deleteDocumentExtraVars', $obj);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief 해당 document의 추천수 증가
|
||||
|
|
@ -1002,13 +1002,13 @@
|
|||
function procDocumentInsertCategory($args = null) {
|
||||
// 입력할 변수 정리
|
||||
if(!$args) $args = Context::gets('module_srl','category_srl','parent_srl','title','expand','group_srls','color','mid');
|
||||
|
||||
if(!$args->module_srl && $args->mid){
|
||||
$mid = $args->mid;
|
||||
unset($args->mid);
|
||||
$args->module_srl = $this->module_srl;
|
||||
}
|
||||
|
||||
|
||||
if(!$args->module_srl && $args->mid){
|
||||
$mid = $args->mid;
|
||||
unset($args->mid);
|
||||
$args->module_srl = $this->module_srl;
|
||||
}
|
||||
|
||||
// 권한 체크
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($args->module_srl);
|
||||
|
|
@ -1596,6 +1596,5 @@
|
|||
$this->setError(-1);
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue