From b60daff8f0cf370fd59b9d8fe8b40c7ef9ab00e6 Mon Sep 17 00:00:00 2001 From: thisgun Date: Thu, 31 Oct 2019 12:17:41 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=ED=8A=B9=EC=A0=95=ED=99=98=EA=B2=BD?= =?UTF-8?q?=EC=97=90=EC=84=9C=20chroot=20=EA=B2=BD=EB=A1=9C=EB=A5=BC=20?= =?UTF-8?q?=EC=B9=98=ED=99=98=ED=95=98=EC=A7=80=20=EB=AA=BB=ED=95=98?= =?UTF-8?q?=EB=8A=94=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.php b/common.php index 542a80dae..b95ef4ba3 100644 --- a/common.php +++ b/common.php @@ -35,7 +35,7 @@ function g5_path() $server_script_filename = preg_replace('/\/+/', '/', str_replace('\\', '/', $_SERVER['SCRIPT_FILENAME'])); $tilde_remove = preg_replace('/^\/\~[^\/]+(.*)$/', '$1', $server_script_name); $document_root = str_replace($tilde_remove, '', $server_script_filename); - $pattern = '/' . preg_quote($document_root, '/') . '/i'; + $pattern = '/.*?' . preg_quote($document_root, '/') . '/i'; $root = preg_replace($pattern, '', $result['path']); $port = ($_SERVER['SERVER_PORT'] == 80 || $_SERVER['SERVER_PORT'] == 443) ? '' : ':'.$_SERVER['SERVER_PORT']; $http = 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ? 's' : '') . '://'; From 617d64b41f1a5645e20331e086b6abac86e54334 Mon Sep 17 00:00:00 2001 From: thisgun Date: Fri, 1 Nov 2019 10:35:11 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=EB=A9=94=EB=89=B4=20=EB=A7=81=ED=81=AC?= =?UTF-8?q?=EC=8B=9C=20=EC=9E=90=EB=8F=99=EC=9C=BC=EB=A1=9C=20=EC=A7=A7?= =?UTF-8?q?=EC=9D=80=EC=A3=BC=EC=86=8C=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= =?UTF-8?q?=EB=90=98=EA=B2=8C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/get_data.lib.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/get_data.lib.php b/lib/get_data.lib.php index 56e74a84f..321119471 100644 --- a/lib/get_data.lib.php +++ b/lib/get_data.lib.php @@ -112,6 +112,9 @@ function get_menu_db($use_mobile=0, $is_cache=false){ $result = sql_query($sql, false); for ($i=0; $row=sql_fetch_array($result); $i++) { + + $row['ori_me_link'] = $row['me_link']; + $row['me_link'] = short_url_clean($row['me_link']); $cache[$key][$i] = $row; $sql2 = " select * @@ -122,6 +125,8 @@ function get_menu_db($use_mobile=0, $is_cache=false){ order by me_order, me_id "; $result2 = sql_query($sql2); for ($k=0; $row2=sql_fetch_array($result2); $k++) { + $row2['ori_me_link'] = $row2['me_link']; + $row2['me_link'] = short_url_clean($row2['me_link']); $cache[$key][$i]['sub'][$k] = $row2; } }