From c50cc0ec1bcfefd2b28e5db0a677df6d06511984 Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 15 Jun 2007 17:25:22 +0000 Subject: Fixed #652. --- HISTORY | 1 + framework/Data/ActiveRecord/Scaffold/TScaffoldListView.php | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/HISTORY b/HISTORY index 20fa9a77..8ebd0a7f 100644 --- a/HISTORY +++ b/HISTORY @@ -4,6 +4,7 @@ BUG: Ticket#621 - TWizardNavigationButtonStyle could not be found (Qiang) BUG: Ticket#627 - Logout did not set correct status to the user object (Qiang) BUG: Ticket#650 - Fixed TMysqlMetaData bug about SHOW FULL TABLES (Qiang) BUG: Ticket#651 - TUserManager Roles names (from config) should be trimmed (Qiang) +BUG: Ticket#652 - OFFSET must be specified together with LIMIT for TScaffoldView (Qiang) BUG: TWizard Sidebar using TDataListItemRenderer has error (Qiang) ENH: Ticket#625 - Added @ to represent authenticated users in auth rules (Qiang) ENH: Ticket#631 - Make TQueue implement Countable as the other collection classes (Knut) diff --git a/framework/Data/ActiveRecord/Scaffold/TScaffoldListView.php b/framework/Data/ActiveRecord/Scaffold/TScaffoldListView.php index 851bf903..edaeadd9 100644 --- a/framework/Data/ActiveRecord/Scaffold/TScaffoldListView.php +++ b/framework/Data/ActiveRecord/Scaffold/TScaffoldListView.php @@ -110,9 +110,11 @@ class TScaffoldListView extends TScaffoldBase $limit = $total - $offset; $criteria = new TActiveRecordCriteria($this->getSearchCondition(), $this->getSearchParameters()); if($limit > 0) + { $criteria->setLimit($limit); - if($offset <= $total) - $criteria->setOffset($offset); + if($offset <= $total) + $criteria->setOffset($offset); + } $order = explode(' ',$this->_sort->getSelectedValue(), 2); if(is_array($order) && count($order) === 2) $criteria->OrdersBy[$order[0]] = $order[1]; -- cgit v1.2.3