From 0e2cb366e62958c7015c66c4c83b8d37f9a90b45 Mon Sep 17 00:00:00 2001 From: thisgun Date: Tue, 20 Oct 2020 19:06:08 +0900 Subject: [PATCH] =?UTF-8?q?5.4=20=EB=B2=84=EC=A0=84=20=EC=9D=B4=EB=B2=A4?= =?UTF-8?q?=ED=8A=B8=20hook=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common.lib.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/common.lib.php b/lib/common.lib.php index d0fca65d1..ad1648eaa 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -1606,15 +1606,19 @@ function sql_query($sql, $error=G5_DISPLAY_SQL_ERROR, $link=null) } } + $end_time = $is_debug ? get_microtime() : 0; + if($result && $is_debug) { // 여기에 실행한 sql문을 화면에 표시하는 로직 넣기 $g5_debug['sql'][] = array( 'sql' => $sql, 'start_time' => $start_time, - 'end_time' => get_microtime(), + 'end_time' => $end_time, ); } + run_event('sql_query_after', $result, $sql, $start_time, $end_time); + return $result; }