From c7b138f631526aefd34398d37073d563ad152303 Mon Sep 17 00:00:00 2001 From: Arcturus Date: Tue, 1 Oct 2024 00:33:24 +0900 Subject: [PATCH] add event --- AvocadoEdition_Light/bbs/write_update.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/AvocadoEdition_Light/bbs/write_update.php b/AvocadoEdition_Light/bbs/write_update.php index 470fff5..56bc458 100644 --- a/AvocadoEdition_Light/bbs/write_update.php +++ b/AvocadoEdition_Light/bbs/write_update.php @@ -239,6 +239,11 @@ if ($w == '' || $w == 'r') { $wr_reply = ''; } + EventHandler::triggerEvent( + "amber.bbs.document_create_before_insert", + $member + ); + $sql = "INSERT INTO $write_table set wr_num = '$wr_num', wr_reply = '$wr_reply', @@ -315,7 +320,7 @@ if ($w == '' || $w == 'r') { // 답변 포인트가 많은 경우 코멘트 대신 답변을 하는 경우가 많음 insert_point($member['mb_id'], $board['bo_comment_point'], "{$board['bo_subject']} {$wr_id} 글답변", $bo_table, $wr_id, '쓰기'); } - + EventHandler::triggerEvent("gnuboard.bbs.write_update_document_create", $board, $wr_id, $w, $qstr, $redirect_url); } else if ($w == 'u') { if (get_session('ss_bo_table') != $_POST['bo_table'] || get_session('ss_wr_id') != $_POST['wr_id']) { @@ -383,6 +388,11 @@ if ($w == '' || $w == 'r') { if (!$is_admin) $sql_ip = " , wr_ip = '{$_SERVER['REMOTE_ADDR']}' "; + EventHandler::triggerEvent( + "amber.bbs.document_update_before_insert", + $member + ); + /** * @var string $wr_3 * @var string $wr_4 @@ -430,6 +440,7 @@ if ($w == '' || $w == 'r') { {$sql_ip} {$sql_password} WHERE wr_id = '{$wr['wr_id']}' "; + sql_query($sql); // 분류가 수정되는 경우 해당되는 코멘트의 분류명도 모두 수정함