summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY1
-rw-r--r--framework/Data/ActiveRecord/Scaffold/TScaffoldListView.php6
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];