From 673478d579d7fb372fd410a153a1f99783d7f021 Mon Sep 17 00:00:00 2001 From: thisgun Date: Mon, 4 Jan 2021 18:09:28 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A7=A4=EC=9A=B0=EC=A4=91=EC=9A=94=20?= =?UTF-8?q?=ED=95=84=EC=88=98=ED=8C=A8=EC=B9=98git=20status!=20=EB=8B=A4?= =?UTF-8?q?=EC=9D=8C=20=EC=9A=B0=ED=8E=B8=EB=B2=88=ED=98=B8=20=EC=84=9C?= =?UTF-8?q?=EB=B9=84=EC=8A=A4=20=EA=B0=80=EC=9D=B4=EB=93=9C=EC=97=90=20?= =?UTF-8?q?=EB=94=B0=EB=A5=B8=20=ED=83=80URL=20=ED=8C=8C=EB=9D=BC=EB=AF=B8?= =?UTF-8?q?=ED=84=B0=20=EB=B6=99=EC=9D=B4=EB=8A=94=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common.lib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/common.lib.php b/lib/common.lib.php index 1565ba167..67321ecfd 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -2549,6 +2549,7 @@ class html_process { // 현재접속자 처리 $tmp_sql = " select count(*) as cnt from {$g5['login_table']} where lo_ip = '{$_SERVER['REMOTE_ADDR']}' "; $tmp_row = sql_fetch($tmp_sql); + $http_host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']; if ($tmp_row['cnt']) { $tmp_sql = " update {$g5['login_table']} set mb_id = '{$member['mb_id']}', lo_datetime = '".G5_TIME_YMDHIS."', lo_location = '{$g5['lo_location']}', lo_url = '{$g5['lo_url']}' where lo_ip = '{$_SERVER['REMOTE_ADDR']}' "; @@ -2613,8 +2614,9 @@ class html_process { foreach($scripts as $js) { if(!trim($js[1])) continue; - - $js[1] = preg_replace('#\.js([\'\"]?>)<\/script>$#i', '.js?ver='.G5_JS_VER.'$1', $js[1]); + + $add_version_str = (stripos($js[1], $http_host) !== false) ? '?ver='.G5_JS_VER : ''; + $js[1] = preg_replace('#\.js([\'\"]?>)<\/script>$#i', '.js'.$add_version_str.'$1', $js[1]); $javascript .= $php_eol.$js[1]; $php_eol = PHP_EOL;