From bbbc568db80cbdce9f3b6e12926b130d7bc7b4d3 Mon Sep 17 00:00:00 2001 From: kkigomi Date: Thu, 22 Jun 2023 15:37:06 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=EA=B4=80=EB=A6=AC=EC=9E=90=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EB=B0=8F=20=EC=9D=BC=EB=B6=80=20=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=20?= =?UTF-8?q?=EC=8B=9C=20Event=20hook=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/contentformupdate.php | 3 +++ adm/faqformupdate.php | 4 ++++ adm/faqmasterformupdate.php | 6 ++++++ adm/mail_delete.php | 1 + adm/mail_update.php | 7 +++++++ adm/newwinformupdate.php | 4 +++- adm/qa_config_update.php | 2 ++ adm/shop_admin/categoryformupdate.php | 3 +++ adm/shop_admin/itemeventformupdate.php | 3 +++ adm/shop_admin/itemqaformupdate.php | 1 + adm/shop_admin/itemqalistupdate.php | 1 + adm/shop_admin/itemuseformupdate.php | 1 + adm/shop_admin/itemuselistupdate.php | 1 + shop/itemqaformupdate.php | 4 ++++ shop/itemuseformupdate.php | 4 ++++ 15 files changed, 44 insertions(+), 1 deletion(-) diff --git a/adm/contentformupdate.php b/adm/contentformupdate.php index a18c1c6cc..2f88546be 100644 --- a/adm/contentformupdate.php +++ b/adm/contentformupdate.php @@ -113,17 +113,20 @@ if ($w == "") { set co_id = '$co_id', $sql_common "; sql_query($sql); + run_event('admin_content_created', $co_id); } elseif ($w == "u") { $sql = " update {$g5['content_table']} set $sql_common where co_id = '$co_id' "; sql_query($sql); + run_event('admin_content_updated', $co_id); } elseif ($w == "d") { @unlink(G5_DATA_PATH . "/content/{$co_id}_h"); @unlink(G5_DATA_PATH . "/content/{$co_id}_t"); $sql = " delete from {$g5['content_table']} where co_id = '$co_id' "; sql_query($sql); + run_event('admin_content_deleted', $co_id); } if (function_exists('get_admin_captcha_by')) { diff --git a/adm/faqformupdate.php b/adm/faqformupdate.php index a68984bcf..0758974a8 100644 --- a/adm/faqformupdate.php +++ b/adm/faqformupdate.php @@ -30,6 +30,7 @@ if ($w == "") sql_query($sql); $fa_id = sql_insert_id(); + run_event('admin_faq_item_created', $fa_id, $fm_id); } else if ($w == "u") { @@ -37,11 +38,14 @@ else if ($w == "u") set $sql_common where fa_id = '$fa_id' "; sql_query($sql); + run_event('admin_faq_item_updated', $fa_id, $fm_id); + } else if ($w == "d") { $sql = " delete from {$g5['faq_table']} where fa_id = '$fa_id' "; sql_query($sql); + run_event('admin_faq_item_deleted', $fa_id, $fm_id); } if ($w == 'd') diff --git a/adm/faqmasterformupdate.php b/adm/faqmasterformupdate.php index 8d0fafd22..e43846893 100644 --- a/adm/faqmasterformupdate.php +++ b/adm/faqmasterformupdate.php @@ -49,9 +49,13 @@ if ($w == "") { sql_query($sql); $fm_id = sql_insert_id(); + run_event('admin_faq_master_created', $fm_id); + } elseif ($w == "u") { $sql = " update {$g5['faq_master_table']} $sql_common where fm_id = '$fm_id' "; sql_query($sql); + run_event('admin_faq_master_updated', $fm_id); + } elseif ($w == "d") { @unlink(G5_DATA_PATH . "/faq/{$fm_id}_h"); @unlink(G5_DATA_PATH . "/faq/{$fm_id}_t"); @@ -63,6 +67,8 @@ if ($w == "") { // FAQ상세삭제 $sql = " delete from {$g5['faq_table']} where fm_id = '$fm_id' "; sql_query($sql); + + run_event('admin_faq_master_deleted', $fm_id); } if ($w == "" || $w == "u") { diff --git a/adm/mail_delete.php b/adm/mail_delete.php index e763c3db9..00cbabedc 100644 --- a/adm/mail_delete.php +++ b/adm/mail_delete.php @@ -19,6 +19,7 @@ for ($i = 0; $i < $post_count_chk; $i++) { $sql = " delete from {$g5['mail_table']} where ma_id = '$ma_id' "; sql_query($sql); + run_event('admin_mail_deleted', $ma_id); } goto_url('./mail_list.php'); diff --git a/adm/mail_update.php b/adm/mail_update.php index 31558022e..556340255 100644 --- a/adm/mail_update.php +++ b/adm/mail_update.php @@ -21,6 +21,10 @@ if ($w == '') { ma_time = '" . G5_TIME_YMDHIS . "', ma_ip = '{$_SERVER['REMOTE_ADDR']}' "; sql_query($sql); + + $ma_id = sql_insert_id(); + run_event('admin_mail_created', $ma_id); + } elseif ($w == 'u') { $sql = " update {$g5['mail_table']} set ma_subject = '{$ma_subject}', @@ -29,9 +33,12 @@ if ($w == '') { ma_ip = '{$_SERVER['REMOTE_ADDR']}' where ma_id = '{$ma_id}' "; sql_query($sql); + run_event('admin_mail_updated', $ma_id); + } elseif ($w == 'd') { $sql = " delete from {$g5['mail_table']} where ma_id = '{$ma_id}' "; sql_query($sql); + run_event('admin_mail_deleted', $ma_id); } goto_url('./mail_list.php'); diff --git a/adm/newwinformupdate.php b/adm/newwinformupdate.php index 3e5faf927..9991b1af9 100644 --- a/adm/newwinformupdate.php +++ b/adm/newwinformupdate.php @@ -59,14 +59,16 @@ $sql_common = " nw_device = '{$posts['nw_device']}', if ($w == "") { $sql = " insert {$g5['new_win_table']} set $sql_common "; sql_query($sql); - $nw_id = sql_insert_id(); + run_event('admin_newwin_created', $nw_id); } elseif ($w == "u") { $sql = " update {$g5['new_win_table']} set $sql_common where nw_id = '$nw_id' "; sql_query($sql); + run_event('admin_newwin_updated', $nw_id); } elseif ($w == "d") { $sql = " delete from {$g5['new_win_table']} where nw_id = '$nw_id' "; sql_query($sql); + run_event('admin_newwin_deleted', $nw_id); } if ($w == "d") { diff --git a/adm/qa_config_update.php b/adm/qa_config_update.php index e671471d4..9d604d5d6 100644 --- a/adm/qa_config_update.php +++ b/adm/qa_config_update.php @@ -108,6 +108,8 @@ $sql = " update {$g5['qa_config_table']} qa_5 = '{$_POST['qa_5']}' "; sql_query($sql); +run_event('admin_qa_config_updated'); + if (function_exists('get_admin_captcha_by')) { get_admin_captcha_by('remove'); } diff --git a/adm/shop_admin/categoryformupdate.php b/adm/shop_admin/categoryformupdate.php index f78169bd6..7409eb9d4 100644 --- a/adm/shop_admin/categoryformupdate.php +++ b/adm/shop_admin/categoryformupdate.php @@ -193,6 +193,7 @@ if ($w == "") ca_name = '$ca_name', $sql_common "; sql_query($sql); + run_event('shop_admin_category_created', $ca_id); } else if ($w == "u") { @@ -212,6 +213,7 @@ else if ($w == "u") $sql .= " and ca_mb_id = '{$member['mb_id']}' "; sql_query($sql); } + run_event('shop_admin_category_updated', $ca_id); } else if ($w == "d") { @@ -243,6 +245,7 @@ else if ($w == "d") // 분류 삭제 $sql = " delete from {$g5['g5_shop_category_table']} where ca_id = '$ca_id' "; sql_query($sql); + run_event('shop_admin_category_deleted', $ca_id); } if(function_exists('get_admin_captcha_by')) diff --git a/adm/shop_admin/itemeventformupdate.php b/adm/shop_admin/itemeventformupdate.php index 181f60408..80fad61f9 100644 --- a/adm/shop_admin/itemeventformupdate.php +++ b/adm/shop_admin/itemeventformupdate.php @@ -75,6 +75,7 @@ if ($w == "") $sql_common , ev_id = '$ev_id' "; sql_query($sql); + run_event('shop_admin_event_created', $ev_id); } else if ($w == "u") { @@ -82,6 +83,7 @@ else if ($w == "u") $sql_common where ev_id = '$ev_id' "; sql_query($sql); + run_event('shop_admin_event_updated', $ev_id); } else if ($w == "d") { @@ -92,6 +94,7 @@ else if ($w == "d") // 이벤트상품삭제 $sql = " delete from {$g5['g5_shop_event_item_table']} where ev_id = '$ev_id' "; sql_query($sql); + run_event('shop_admin_event_deleted', $ev_id); $sql = " delete from {$g5['g5_shop_event_table']} where ev_id = '$ev_id' "; sql_query($sql); diff --git a/adm/shop_admin/itemqaformupdate.php b/adm/shop_admin/itemqaformupdate.php index a23ded782..5b44c3c60 100644 --- a/adm/shop_admin/itemqaformupdate.php +++ b/adm/shop_admin/itemqaformupdate.php @@ -19,6 +19,7 @@ if ($w == "u") iq_answer = '$iq_answer' where iq_id = '$iq_id' "; sql_query($sql); + run_event('shop_admin_item_qa_updated', $iq_id); if(trim($iq_answer)) { $sql = " select a.iq_email, a.iq_hp, b.it_name diff --git a/adm/shop_admin/itemqalistupdate.php b/adm/shop_admin/itemqalistupdate.php index 247d7dab9..cb0ab10ab 100644 --- a/adm/shop_admin/itemqalistupdate.php +++ b/adm/shop_admin/itemqalistupdate.php @@ -23,6 +23,7 @@ if ($_POST['act_button'] == "선택삭제") { $sql = "delete from {$g5['g5_shop_item_qa_table']} where iq_id = '{$iiq_id}' "; sql_query($sql); + run_event('shop_admin_item_qa_deleted', $iiq_id); } } diff --git a/adm/shop_admin/itemuseformupdate.php b/adm/shop_admin/itemuseformupdate.php index 2246bcfc6..058333bec 100644 --- a/adm/shop_admin/itemuseformupdate.php +++ b/adm/shop_admin/itemuseformupdate.php @@ -34,6 +34,7 @@ if ($w == "u") is_reply_name = '".$member['mb_nick']."' where is_id = '".$posts['is_id']."'"; sql_query($sql); + run_event('shop_admin_item_use_updated', $posts['is_id']); if( isset($_POST['it_id']) ) { update_use_cnt($_POST['it_id']); diff --git a/adm/shop_admin/itemuselistupdate.php b/adm/shop_admin/itemuselistupdate.php index df911beee..e7155d0c4 100644 --- a/adm/shop_admin/itemuselistupdate.php +++ b/adm/shop_admin/itemuselistupdate.php @@ -40,6 +40,7 @@ for ($i=0; $i<$count_post_chk; $i++) { $sql = "delete from {$g5['g5_shop_item_use_table']} where is_id = '{$iis_id}' "; sql_query($sql); + run_event('shop_admin_item_use_deleted', $iis_id); } if($iit_id){ diff --git a/shop/itemqaformupdate.php b/shop/itemqaformupdate.php index bb44f1e19..cb7522ed8 100644 --- a/shop/itemqaformupdate.php +++ b/shop/itemqaformupdate.php @@ -47,6 +47,8 @@ if ($w == "") iq_time = '".G5_TIME_YMDHIS."', iq_ip = '".$_SERVER['REMOTE_ADDR']."' "; sql_query($sql); + $iq_id = sql_insert_id(); + run_event('shop_item_qa_created', $iq_id, $it_id); $alert_msg = '상품문의가 등록 되었습니다.'; } @@ -68,6 +70,7 @@ else if ($w == "u") iq_question = '$iq_question' where iq_id = '$iq_id' "; sql_query($sql); + run_event('shop_item_qa_updated', $iq_id, $it_id); $alert_msg = '상품문의가 수정 되었습니다.'; } @@ -128,6 +131,7 @@ else if ($w == "d") $sql = " delete from {$g5['g5_shop_item_qa_table']} where iq_id = '$iq_id' and md5(concat(iq_id,iq_time,iq_ip)) = '{$hash}' "; sql_query($sql); + run_event('shop_item_qa_deleted', $iq_id, $it_id); $alert_msg = '상품문의가 삭제 되었습니다.'; } diff --git a/shop/itemuseformupdate.php b/shop/itemuseformupdate.php index 997e1bbab..ddde3c70d 100644 --- a/shop/itemuseformupdate.php +++ b/shop/itemuseformupdate.php @@ -59,6 +59,8 @@ if ($w == "") if (!$default['de_item_use_use']) $sql .= ", is_confirm = '1' "; sql_query($sql); + $is_id = sql_insert_id(); + run_event('shop_item_use_created', $is_id, $it_id); if ($default['de_item_use_use']) { $alert_msg = "평가하신 글은 관리자가 확인한 후에 출력됩니다."; @@ -80,6 +82,7 @@ else if ($w == "u") is_score = '$is_score' where is_id = '$is_id' "; sql_query($sql); + run_event('shop_item_use_updated', $is_id, $it_id); $alert_msg = "사용후기가 수정 되었습니다."; } @@ -118,6 +121,7 @@ else if ($w == "d") $sql = " delete from {$g5['g5_shop_item_use_table']} where is_id = '$is_id' and md5(concat(is_id,is_time,is_ip)) = '{$hash}' "; sql_query($sql); + run_event('shop_item_use_deleted', $is_id, $it_id); $alert_msg = "사용후기를 삭제 하였습니다."; } From af64737b6309c05512b365ac344d7fedbe9d39d8 Mon Sep 17 00:00:00 2001 From: kkigomi Date: Fri, 30 Jun 2023 22:02:42 +0900 Subject: [PATCH 2/5] =?UTF-8?q?PRS-12=20=EC=BD=94=EB=93=9C=20=ED=8F=AC?= =?UTF-8?q?=EB=A7=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../editor/cheditor5/imageUpload/upload.php | 90 ++++++++++--------- 1 file changed, 47 insertions(+), 43 deletions(-) diff --git a/plugin/editor/cheditor5/imageUpload/upload.php b/plugin/editor/cheditor5/imageUpload/upload.php index 0a0fb0b9f..39e9dd928 100644 --- a/plugin/editor/cheditor5/imageUpload/upload.php +++ b/plugin/editor/cheditor5/imageUpload/upload.php @@ -1,35 +1,35 @@ array("imagecreatefromgif", "imagegif"), - "image/jpg" => array("imagecreatefromjpeg", "imagejpeg"), - "image/jpeg" => array("imagecreatefromjpeg", "imagejpeg"), - "image/png" => array("imagecreatefrompng", "imagepng"), - "image/webp" => array("imagecreatefromwebp", "imagewebp"), - "image/bmp" => array("imagecreatefromwbmp", "imagewbmp") + "image/gif" => array("imagecreatefromgif", "imagegif"), + "image/jpg" => array("imagecreatefromjpeg", "imagejpeg"), + "image/jpeg" => array("imagecreatefromjpeg", "imagejpeg"), + "image/png" => array("imagecreatefrompng", "imagepng"), + "image/webp" => array("imagecreatefromwebp", "imagewebp"), + "image/bmp" => array("imagecreatefromwbmp", "imagewbmp") ); // Extracting mime type using getimagesize try { $image_info = getimagesize($file_path); if ($image_info === null) { - //throw new Exception("Invalid image type"); - return false; + //throw new Exception("Invalid image type"); + return false; } $mime_type = $image_info["mime"]; if (!array_key_exists($mime_type, $MIME_TYPES_PROCESSORS)) { - //throw new Exception("Invalid image MIME type"); - return false; + //throw new Exception("Invalid image MIME type"); + return false; } $image_from_file = $MIME_TYPES_PROCESSORS[$mime_type][0]; @@ -38,13 +38,13 @@ if( !function_exists('che_reprocessImage') ){ $reprocessed_image = @$image_from_file($file_path); if (!$reprocessed_image) { - //throw new Exception("Unable to create reprocessed image from file"); - return false; + //throw new Exception("Unable to create reprocessed image from file"); + return false; } // Calling callback(if set) with path of image as a parameter if ($callback !== null) { - $callback($reprocessed_image); + $callback($reprocessed_image); } // Freeing up memory @@ -60,13 +60,13 @@ if( !function_exists('che_reprocessImage') ){ $is_editor_upload = false; -$get_nonce = get_session('nonce_'.FT_NONCE_SESSION_KEY); +$get_nonce = get_session('nonce_' . FT_NONCE_SESSION_KEY); -if( $get_nonce && ft_nonce_is_valid( $get_nonce, 'cheditor' ) ){ +if ($get_nonce && ft_nonce_is_valid($get_nonce, 'cheditor')) { $is_editor_upload = true; } -if( !$is_editor_upload ){ +if (!$is_editor_upload) { exit; } @@ -78,19 +78,19 @@ run_event('cheditor_photo_upload', $data_dir, $data_url); $tempfile = $_FILES['file']['tmp_name']; $filename = $_FILES['file']['name']; $filename_len = strrpos($filename, "."); -$type = substr($filename, strrpos($filename, ".")+1); +$type = substr($filename, strrpos($filename, ".") + 1); $found = false; switch ($type) { - case "jpg": - case "jpeg": - case "gif": - case "png": + case "jpg": + case "jpeg": + case "gif": + case "png": case "webp": - $found = true; + $found = true; } if ($found != true || $filename_len != 23) { - exit; + exit; } // 저장 파일 이름: 년월일시분초_렌덤문자8자 @@ -105,32 +105,36 @@ $imgsize = getimagesize($savefile); $filesize = filesize($savefile); if (!$imgsize) { - $filesize = 0; - $random_name = '-ERR'; - unlink($savefile); -}; + $filesize = 0; + $random_name = '-ERR'; + unlink($savefile); +} -if ( CHE_UPLOAD_IMG_CHECK && ! che_reprocessImage($savefile, null) ){ - $filesize = 0; - $random_name = '-ERR'; - unlink($savefile); +if (CHE_UPLOAD_IMG_CHECK && !che_reprocessImage($savefile, null)) { + $filesize = 0; + $random_name = '-ERR'; + unlink($savefile); } try { - if(defined('G5_FILE_PERMISSION')) chmod($savefile, G5_FILE_PERMISSION); + if (defined('G5_FILE_PERMISSION')) { + chmod($savefile, G5_FILE_PERMISSION); + } } catch (Exception $e) { } -$file_url = SAVE_URL.'/'.$filename; +$file_url = SAVE_URL . '/' . $filename; -if( function_exists('run_replace') ){ +if (function_exists('run_replace')) { $file_url = run_replace('get_editor_upload_url', $file_url, $savefile, array()); } -$rdata = sprintf('{"fileUrl": "%s", "filePath": "%s", "fileName": "%s", "fileSize": "%d" }', - $file_url, - $savefile, - $filename, - $filesize ); +$rdata = sprintf( + '{"fileUrl": "%s", "filePath": "%s", "fileName": "%s", "fileSize": "%d" }', + $file_url, + $savefile, + $filename, + $filesize +); echo $rdata; \ No newline at end of file From 8ec09b00599d611cf1f78185901d0252738ca844 Mon Sep 17 00:00:00 2001 From: kkigomi Date: Fri, 30 Jun 2023 22:18:30 +0900 Subject: [PATCH 3/5] =?UTF-8?q?CHEditor=EC=97=90=EC=84=9C=20=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=EC=A7=80=20=EC=97=85=EB=A1=9C=EB=93=9C=EC=8B=9C=20`ge?= =?UTF-8?q?t=5Feditor=5Fupload=5Furl`=20Hook=EC=97=90=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=EC=9D=98=20=EC=A0=95=EB=B3=B4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `get_editor_upload_url` Hook의 세번째 인자에 파일의 추가 정보를 전달. smarteditor2에서 정의한 것과 동일한 유형으로 데이터를 담음. --- plugin/editor/cheditor5/imageUpload/upload.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/plugin/editor/cheditor5/imageUpload/upload.php b/plugin/editor/cheditor5/imageUpload/upload.php index 39e9dd928..463ae0d27 100644 --- a/plugin/editor/cheditor5/imageUpload/upload.php +++ b/plugin/editor/cheditor5/imageUpload/upload.php @@ -126,7 +126,22 @@ try { $file_url = SAVE_URL . '/' . $filename; if (function_exists('run_replace')) { - $file_url = run_replace('get_editor_upload_url', $file_url, $savefile, array()); + $fileInfo = new \stdClass(); + $fileInfo->name = (string) $filename; + $fileInfo->size = (int) $filesize; + $fileInfo->url = (string) $file_url; + + if (isset($_POST['origname'])) { + $fileInfo->oriname = (string) $_POST['origname']; + } + + if ($imgsize) { + $fileInfo->width = (int) $imgsize[0]; + $fileInfo->height = (int) $imgsize[1]; + $fileInfo->type = (string) $imgsize['mime']; + } + + $file_url = run_replace('get_editor_upload_url', $file_url, $savefile, $fileInfo); } $rdata = sprintf( From 6e684e80f2f5726aa2c055f80dbe14994f5b1d2f Mon Sep 17 00:00:00 2001 From: kkigomi <112419763+kkigomi@users.noreply.github.com> Date: Sat, 8 Jul 2023 06:58:03 +0900 Subject: [PATCH 4/5] =?UTF-8?q?add=5Freplace()=EC=97=90=EC=84=9C=20$args?= =?UTF-8?q?=20=EA=B0=92=EC=9D=84=201=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit replace hook은 값을 반환해야하므로 항상 최소 1개의 인자를 받아야하지만 기본 값이 0이어서 매번 이를 변경해줘야하는 문제 --- lib/hook.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hook.lib.php b/lib/hook.lib.php index 7ec8a8b15..c864ec2f6 100644 --- a/lib/hook.lib.php +++ b/lib/hook.lib.php @@ -65,7 +65,7 @@ function run_event($tag, $arg = ''){ } } -function add_replace($tag, $func, $priority=G5_HOOK_DEFAULT_PRIORITY, $args=0){ +function add_replace($tag, $func, $priority=G5_HOOK_DEFAULT_PRIORITY, $args=1){ if( $hook = get_hook_class() ){ return $hook->addFilter($tag, $func, $priority, $args); @@ -130,4 +130,4 @@ function get_hook_datas($type='', $is_callback=''){ } return null; -} \ No newline at end of file +} From f96ff445b971d797497dff95610669b60c3d0a47 Mon Sep 17 00:00:00 2001 From: kkigomi <112419763+kkigomi@users.noreply.github.com> Date: Sun, 9 Jul 2023 05:05:12 +0900 Subject: [PATCH 5/5] =?UTF-8?q?get=5Fmicrotime=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 불필요한 연산 제거 --- lib/common.lib.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/common.lib.php b/lib/common.lib.php index 2fdef5cfa..a0f4960f1 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -9,11 +9,14 @@ include_once(dirname(__FILE__) .'/pbkdf2.compat.php'); ** *************************************************************************/ -// 마이크로 타임을 얻어 계산 형식으로 만듦 +/** + * 마이크로타임을 반환 + * @return float + * @deprecated use `microtime(true)` + */ function get_microtime() { - list($usec, $sec) = explode(" ",microtime()); - return ((float)$usec + (float)$sec); + return microtime(true); }