Skip to content

Commit

Permalink
매우중요 필수패치!!! 다음 우편번호 서비스 가이드에 따른 타URL 파라미터 붙이는 코드 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
thisgun committed Jan 4, 2021
1 parent 77b5316 commit 239b5d7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/common.lib.php
Expand Up @@ -2549,6 +2549,7 @@ function run()
// 현재접속자 처리
$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']}' ";
Expand Down Expand Up @@ -2613,8 +2614,9 @@ function run()
foreach($scripts as $js) {
if(!trim($js[1]))
continue;

$js[1] = preg_replace('#\.js([\'\"]?>)<\/script>$#i', '.js?ver='.G5_JS_VER.'$1</script>', $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</script>', $js[1]);

$javascript .= $php_eol.$js[1];
$php_eol = PHP_EOL;
Expand Down

0 comments on commit 239b5d7

Please sign in to comment.