|
|
@@ -499,9 +499,16 @@ class Route_ViewTableAjax extends RouteBase {
|
|
|
$params[$k] = $v;
|
|
|
}
|
|
|
}
|
|
|
- $total = $acl->getTotal($params);
|
|
|
- // if ($total > $exportLimit) $params['limit'] = $exportLimit;
|
|
|
- $items = $acl->getItems($params);
|
|
|
+ try {
|
|
|
+ $queryFeatures = $acl->buildQuery($params);
|
|
|
+ $total = $queryFeatures->getTotal();
|
|
|
+ $listItems = $queryFeatures->getItems();
|
|
|
+ $primaryKeyField = $acl->getPrimaryKeyField();
|
|
|
+ $items = []; foreach ($listItems as $item) $items[ $item[$primaryKeyField] ] = $item;
|
|
|
+ } catch (Exception $e) {
|
|
|
+ DBG::log($e);
|
|
|
+ throw $e;
|
|
|
+ }
|
|
|
|
|
|
$format = V::get('format', 'html', $_GET);
|
|
|
switch ($format) {
|