diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-08-01 14:20:09 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-08-06 11:02:55 +0400 |
commit | 6da08c8c9dfa30d6925a40fe75110c10a3e7ada9 (patch) | |
tree | d91edd7bd1e3fa0cd9d0c00f942df9f52aa540ed /core/API | |
parent | f509b68332649dbb559eac0d61127bea691b4e52 (diff) |
refs #5896 by converting an array to a dataTable the generic filters would work. wondering if it fails any test
Diffstat (limited to 'core/API')
-rw-r--r-- | core/API/ResponseBuilder.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/API/ResponseBuilder.php b/core/API/ResponseBuilder.php index 2c411ffe24..54c6cc664d 100644 --- a/core/API/ResponseBuilder.php +++ b/core/API/ResponseBuilder.php @@ -372,6 +372,15 @@ class ResponseBuilder return $multiDimensional; } + $isAssoc = ($array !== array_values($array)); + + if ($isAssoc) { + $dataTable = new DataTable(); + $dataTable->addRowsFromSimpleArray($array); + + return $this->handleDataTable($dataTable); + } + return $this->getRenderedDataTable($array); } |