위젯 검출 정규 표현식을 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2892 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-11-01 10:28:42 +00:00
parent f9896fe51a
commit 90aa62a6ac
993 changed files with 9190 additions and 10457 deletions

View file

@ -205,5 +205,69 @@
$this->add('poll_srl', $poll_srl);
$this->add('tpl',$tpl);
}
/**
* @brief 게시글 삭제시 poll 삭제하는 trigger
**/
function triggerDeleteDocumentPoll(&$obj) {
$document_srl = $obj->document_srl;
if(!$document_srl) return new Object();
// 설문조사를 구함
$args->upload_target_srl = $document_srl;
$output = executeQuery('poll.getPollByTargetSrl', $args);
if(!$output->data) return new Object();
$poll_srl = $output->data->poll_srl;
if(!$poll_srl) return new Object();
$args->poll_srl = $poll_srl;
$output = executeQuery('poll.deletePoll', $args);
if(!$output->toBool()) return $output;
$output = executeQuery('poll.deletePollItem', $args);
if(!$output->toBool()) return $output;
$output = executeQuery('poll.deletePollTitle', $args);
if(!$output->toBool()) return $output;
$output = executeQuery('poll.deletePollLog', $args);
if(!$output->toBool()) return $output;
return new Object();
}
/**
* @brief 댓글 삭제시 poll 삭제하는 trigger
**/
function triggerDeleteCommentPoll(&$obj) {
$comment_srl = $obj->comment_srl;
if(!$comment_srl) return new Object();
// 설문조사를 구함
$args->upload_target_srl = $comment_srl;
$output = executeQuery('poll.getPollByTargetSrl', $args);
if(!$output->data) return new Object();
$poll_srl = $output->data->poll_srl;
if(!$poll_srl) return new Object();
$args->poll_srl = $poll_srl;
$output = executeQuery('poll.deletePoll', $args);
if(!$output->toBool()) return $output;
$output = executeQuery('poll.deletePollItem', $args);
if(!$output->toBool()) return $output;
$output = executeQuery('poll.deletePollTitle', $args);
if(!$output->toBool()) return $output;
$output = executeQuery('poll.deletePollLog', $args);
if(!$output->toBool()) return $output;
return new Object();
}
}
?>