From: sparky4 Date: Wed, 23 Feb 2011 08:34:05 +0000 (-0600) Subject: modified: yotsubanome.php X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=9862376ab28cd7927bfcdb83294a246dacad08a9;p=test.git modified: yotsubanome.php --- diff --git a/yotsubanome.php b/yotsubanome.php index 7026529..b44aeeb 100755 --- a/yotsubanome.php +++ b/yotsubanome.php @@ -125,8 +125,10 @@ function updatelog($resno=0,$page_num=-1,$single_page=false){ $page_end = ceil($threads_count / PAGE_DEF) - 1; // 頁面編號最後值 }else{ // 討論串分頁模式 (PHP動態輸出一頁份) $threads_count = $PIO->threadCount(); // 討論串個數 - /*//---- if($page_num < 0 || ($page_num * PAGE_DEF) >= $threads_count) error(_T('page_not_found')); // $page_num超過範圍*/ - if($threads_count != 0 && $page_num != 0 || ($page_num < 0 || ($page_num * PAGE_DEF) >= $threads_count)) error(_T('page_not_found')); // $page_num超過範圍 + //---- if($page_num < 0 || ($page_num * PAGE_DEF) >= $threads_count) error(_T('page_not_found')); // $page_num超過範圍 + //++++---- Page 0 bug fix + if($page_num!=0) if($page_num < 0 || ($page_num * PAGE_DEF) >= $threads_count) error(_T('page_not_found')); // $page_num超過範圍 + //++++---- $page_start = $page_end = $page_num; // 設定靜態頁面編號 $threads = $PIO->fetchThreadList($page_num * PAGE_DEF, PAGE_DEF); // 取出分頁後的討論串首篇列表 $PMS->useModuleMethods('ThreadOrder', array($resno,$page_num,$single_page,&$threads)); // "ThreadOrder" Hook Point @@ -187,7 +189,9 @@ function updatelog($resno=0,$page_num=-1,$single_page=false){ $PMS->useModuleMethods('ThreadFront', array(&$pte_vals['{$THREADFRONT}'], $resno)); // "ThreadFront" Hook Point $PMS->useModuleMethods('ThreadRear', array(&$pte_vals['{$THREADREAR}'], $resno)); // "ThreadRear" Hook Point + //++++---- Page 0 bug fix if($tree_count==0 && $page_end==-1) $page_end = 0; + //++++---- // 生成靜態頁面一頁份內容 for($page = $page_start; $page <= $page_end; $page++){