지정된 시간 체크, 수정시 제외

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5123 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2008-12-18 06:56:05 +00:00
parent 9d8651be66
commit 6cf8eafe2f
2 changed files with 16 additions and 9 deletions

View file

@ -73,7 +73,7 @@
}
/**
* @brief 코멘트의 권한 부여
* @brief 코멘트의 권한 부여
* 세션값으로 접속상태에서만 사용 가능
**/
function addGrant($comment_srl) {
@ -84,6 +84,7 @@
* @brief 댓글 입력
**/
function insertComment($obj, $manual_inserted = false) {
$obj->__isupdate = false;
// trigger 호출 (before)
$output = ModuleHandler::triggerCall('comment.insertComment', 'before', $obj);
if(!$output->toBool()) return $output;
@ -209,11 +210,11 @@
// 댓글의 권한을 부여
$this->addGrant($obj->comment_srl);
}
// trigger 호출 (after)
if($output->toBool()) {
$trigger_output = ModuleHandler::triggerCall('comment.insertComment', 'after', $obj);
$trigger_output = ModuleHandler::triggerCall('comment.insertComment', 'after', $obj);
if(!$trigger_output->toBool()) {
$oDB->rollback();
return $trigger_output;
@ -243,6 +244,7 @@
* @brief 댓글 수정
**/
function updateComment($obj, $is_admin = false) {
$obj->__isupdate = true;
// trigger 호출 (before)
$output = ModuleHandler::triggerCall('comment.updateComment', 'before', $obj);
if(!$output->toBool()) return $output;

View file

@ -48,9 +48,11 @@
$output = $oFilterModel->isDeniedWord($text);
if(!$output->toBool()) return $output;
// 지정된 시간 체크
$output = $oFilterModel->checkLimited();
if(!$output->toBool()) return $output;
// 지정된 시간 체크, 수정시 제외
if($obj->document_srl == 0){
$output = $oFilterModel->checkLimited();
if(!$output->toBool()) return $output;
}
// 로그 남김
$this->insertLog();
@ -86,9 +88,12 @@
$output = $oFilterModel->isDeniedWord($text);
if(!$output->toBool()) return $output;
// 지정된 시간 체크
$output = $oFilterModel->checkLimited();
if(!$output->toBool()) return $output;
// 지정된 시간 체크 수정이 아닌경우만
if(!$obj->__isupdate){
$output = $oFilterModel->checkLimited();
if(!$output->toBool()) return $output;
}
unset($obj->__isupdate);
// 로그 남김
$this->insertLog();