이전의 설문조사는 어쩔 수 없으나 신규 설문조사 부터는 문서/댓글의 위치를 trigger을 이용하여 제대로 연결되도록 하고 관리자 페이지에서 문서 또는 댓글에서의 등록 유무를 체크하여 원본을 잘 찾도록 기능 변경

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4127 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-04-22 03:07:06 +00:00
parent 0e38dea1d0
commit a69193bc50
13 changed files with 153 additions and 13 deletions

View file

@ -24,5 +24,27 @@
return $output;
}
/**
* @brief 설문조사의 원본을 구함
**/
function getPollAdminTarget() {
$poll_srl = Context::get('poll_srl');
$upload_target_srl = Context::get('upload_target_srl');
$oDocumentModel = &getModel('document');
$oCommentModel = &getModel('comment');
$oDocument = $oDocumentModel->getDocument($upload_target_srl);
if(!$oDocument->isExists()) $oComment = $oCommentModel->getComment($upload_target_srl);
if($oComment->isExists()) {
$this->add('document_srl', $oComment->get('document_srl'));
$this->add('comment_srl', $oComment->get('comment_srl'));
} elseif($oDocument->isExists()) {
$this->add('document_srl', $oDocument->get('document_srl'));
} else return new Object(-1, 'msg_not_founded');
}
}
?>