From 5552fda906918015a07222842cea0555b91d546e Mon Sep 17 00:00:00 2001 From: thisgun Date: Tue, 4 Feb 2025 10:49:01 +0900 Subject: [PATCH] =?UTF-8?q?=EC=82=AC=EC=9D=B4=EB=93=9C=EB=B7=B0=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=9E=98=EB=AA=BB=EB=90=9C=20=EB=8B=89=EB=84=A4?= =?UTF-8?q?=EC=9E=84=20=EB=98=90=EB=8A=94=20=EC=9D=B4=EB=A6=84=EC=9D=B4=20?= =?UTF-8?q?=EC=B6=9C=EB=A0=A5=EB=90=98=EB=8A=94=20=EC=98=A4=EB=A5=98=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 --- lib/common.lib.php | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/lib/common.lib.php b/lib/common.lib.php index dd339a181..7100a04c5 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -1398,15 +1398,14 @@ function get_sideview($mb_id, $name='', $email='', $homepage='') static $cache = array(); $name = get_text($name, 0, true); - - if (isset($cache['id:' . $mb_id]) && $cache['id:' . $mb_id]) { + $namekey = ($mb_id && $name) ? $mb_id."\t".$name : ''; + + // id는 유니크하지만 닉네임 또는 이름은 변경이 가능하다 + // name의 경우 비회원은 게시판에 동일한 이름을 등록할수 있다. + if ($namekey && isset($cache['idname:' . $namekey]) && $cache['idname:' . $namekey]) { + return $cache['idname:' . $namekey]; + } else if (isset($cache['id:' . $mb_id]) && $cache['id:' . $mb_id]) { return $cache['id:' . $mb_id]; - } else if ( - isset($name) - && isset($cache['name:' . $name]) - && $cache['name:' . $name] - ) { - return $cache['name:' . $name]; } $email = get_string_encrypt($email); @@ -1520,11 +1519,11 @@ function get_sideview($mb_id, $name='', $email='', $homepage='') $str .= $str2; $str .= ''; $str .= ""; - - if ($mb_id) { + + if ($namekey) { + $cache['idname:' . $namekey] = $str; + } else if ($mb_id && !$name) { $cache['id:' . $mb_id] = $str; - } else { - $cache['name:' . $name] = $str; } return $str;