From 6d4ddc7ee31a2c601da03dcec7587529f6fa8062 Mon Sep 17 00:00:00 2001 From: gnuboard Date: Mon, 21 Oct 2013 11:59:32 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BA=A1=EC=B0=A8=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=9E=90=EB=8F=99=20=EC=82=AD=EC=A0=9C=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/kcaptcha/kcaptcha_mp3.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin/kcaptcha/kcaptcha_mp3.php b/plugin/kcaptcha/kcaptcha_mp3.php index d7c0cd35a..415ba48fc 100644 --- a/plugin/kcaptcha/kcaptcha_mp3.php +++ b/plugin/kcaptcha/kcaptcha_mp3.php @@ -3,7 +3,7 @@ include_once("_common.php"); function make_mp3() { - global $g4, $config; + global $config; $number = get_session("ss_captcha_key"); @@ -26,10 +26,10 @@ function make_mp3() file_put_contents(G5_PATH.'/'.$mp3_file, $contents); - // 지난 캡챠 파일 삭제 - if (rand(0,10) == 0) { + // 지난 캡챠 파일 삭제 (100번중에 한번만 실행) + if (rand(0,99) == 0) { foreach (glob(G5_PATH.'/data/cache/kcaptcha-*.mp3') as $file) { - if (filemtime($file) + 86400 < $g4['server_time']) { + if (filemtime($file) + 86400 < G5_SERVER_TIME) { unset($file); } }