From 25404f4ee949cda442d4c256ef2edd88fdee779f Mon Sep 17 00:00:00 2001 From: gnuboard Date: Fri, 1 Feb 2013 15:30:03 +0900 Subject: [PATCH 1/2] =?UTF-8?q?page=3D=20=EB=91=90=EA=B0=9C=EC=94=A9=20?= =?UTF-8?q?=EB=82=98=EC=98=A4=EC=A7=80=20=EC=95=8A=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/view.php | 4 ++-- lib/common.lib.php | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bbs/view.php b/bbs/view.php index e5cf92346..6cf09d121 100644 --- a/bbs/view.php +++ b/bbs/view.php @@ -47,14 +47,14 @@ if (!$board['bo_use_list_view']) { $prev_href = ''; if (isset($prev['wr_id']) && $prev['wr_id']) { $prev_wr_subject = get_text(cut_str($prev['wr_subject'], 255)); - $prev_href = './board.php?bo_table='.$bo_table.'&wr_id='.$prev['wr_id'].'&page='.$page.$qstr; + $prev_href = './board.php?bo_table='.$bo_table.'&wr_id='.$prev['wr_id'].$qstr; } // 다음글 링크 $next_href = ''; if (isset($next['wr_id']) && $next['wr_id']) { $next_wr_subject = get_text(cut_str($next['wr_subject'], 255)); - $next_href = './board.php?bo_table='.$bo_table.'&wr_id='.$next['wr_id'].'&page='.$page.$qstr; + $next_href = './board.php?bo_table='.$bo_table.'&wr_id='.$next['wr_id'].$qstr; } // 쓰기 링크 diff --git a/lib/common.lib.php b/lib/common.lib.php index 16ae5d1dd..f1d492138 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -18,6 +18,8 @@ function get_microtime() // 현재페이지, 총페이지수, 한페이지에 보여줄 행, URL function get_paging($write_pages, $cur_page, $total_page, $url, $add="") { + $url = preg_replace('#(&|&)?page\=[0-9]+#', '', $url); + $str = ''; if ($cur_page > 1) { $str .= '처음'.PHP_EOL; @@ -801,7 +803,7 @@ function get_category_option($bo_table='', $ca_name='') $category = trim($arr[$i]); if (!$category) continue; - $str .= "