#211 요청받은 mid와 document_srl의 mid를 체크, 다를 경우 오류 출력

This commit is contained in:
khongchi 2013-12-23 19:23:20 +09:00
parent 1419a09275
commit 0918ae8b7b

View file

@ -141,8 +141,9 @@ class ModuleHandler extends Handler
} }
// Get module's information based on document_srl, if it's specified // Get module's information based on document_srl, if it's specified
if($this->document_srl && !$this->module) if($this->document_srl)
{ {
$module_info = $oModuleModel->getModuleInfoByDocumentSrl($this->document_srl); $module_info = $oModuleModel->getModuleInfoByDocumentSrl($this->document_srl);
// If the document does not exist, remove document_srl // If the document does not exist, remove document_srl
@ -162,10 +163,12 @@ class ModuleHandler extends Handler
return FALSE; return FALSE;
} }
} }
// if requested module is different from one of the document, remove the module information retrieved based on the document number // if requested module is different from one of the document, remove the module information retrieved based on the document number
if($this->module && $module_info->module != $this->module) if($this->module && $module_info->module != $this->module)
{ {
unset($module_info); $this->error = 'msg_invalid_request';
return TRUE;
} }
} }
@ -279,7 +282,7 @@ class ModuleHandler extends Handler
if(!$output->toBool()) if(!$output->toBool())
{ {
$this->error = $output->getMessage(); $this->error = $output->getMessage();
return FALSE; return TRUE;
} }
// Set current module info into context // Set current module info into context