summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorxue <>2006-02-06 04:55:48 +0000
committerxue <>2006-02-06 04:55:48 +0000
commitb2ff418c4f38ee2799bfa6c91618d0e5be666d0e (patch)
tree329b9218b6d9a79d2becc830a9c0d77e1a97b9d2 /framework
parenta4f9d4234a6810c2ec8a4e53f2d903172daa0759 (diff)
Fixed a bug in computing page numbers.
Diffstat (limited to 'framework')
-rw-r--r--framework/Web/UI/WebControls/TDataGrid.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/framework/Web/UI/WebControls/TDataGrid.php b/framework/Web/UI/WebControls/TDataGrid.php
index 753ec351..b8151d97 100644
--- a/framework/Web/UI/WebControls/TDataGrid.php
+++ b/framework/Web/UI/WebControls/TDataGrid.php
@@ -1060,8 +1060,7 @@ class TDataGrid extends TBaseDataList implements INamingContainer
$endPageIndex=$buttonCount;
if($pageIndex>$endPageIndex)
{
- //$startPageIndex=((int)($pageIndex/$maxButtonCount))*$maxButtonCount+1;
- $startPageIndex=$pageIndex;
+ $startPageIndex=((int)(($pageIndex-1)/$maxButtonCount))*$maxButtonCount+1;
if(($endPageIndex=$startPageIndex+$maxButtonCount-1)>$pageCount)
$endPageIndex=$pageCount;
if($endPageIndex-$startPageIndex+1<$maxButtonCount)