diff --git a/core/components/formit/src/FormIt/Processors/Mgr/Encryption/GetList.php b/core/components/formit/src/FormIt/Processors/Mgr/Encryption/GetList.php index 00c57ac..e3aa747 100644 --- a/core/components/formit/src/FormIt/Processors/Mgr/Encryption/GetList.php +++ b/core/components/formit/src/FormIt/Processors/Mgr/Encryption/GetList.php @@ -57,6 +57,7 @@ public function prepareQueryBeforeCount(xPDOQuery $criteria) ]); } + $criteria->select('MIN(id) AS id, form, context_key'); $criteria->groupby('form'); $criteria->groupby('context_key'); @@ -70,7 +71,7 @@ public function prepareQueryBeforeCount(xPDOQuery $criteria) */ public function prepareRow(xPDOObject $object) { - return array_merge($object->toArray(), [ + return array_merge($object->toArray('', false, true), [ 'encrypted' => $this->modx->getCount($this->classKey, [ 'form' => $object->get('form'), 'context_key' => $object->get('context_key'), @@ -99,4 +100,3 @@ public function getAvailableContexts() return $contexts; } } - diff --git a/core/components/formit/src/FormIt/Processors/Mgr/Forms/GetForms.php b/core/components/formit/src/FormIt/Processors/Mgr/Forms/GetForms.php index 0dceb68..814fb4e 100644 --- a/core/components/formit/src/FormIt/Processors/Mgr/Forms/GetForms.php +++ b/core/components/formit/src/FormIt/Processors/Mgr/Forms/GetForms.php @@ -63,6 +63,7 @@ public function prepareQueryBeforeCount(xPDOQuery $criteria) 'context_key:IN' => $this->getAvailableContexts() ]); + $criteria->select('MIN(id) AS id, form'); $criteria->groupby('form'); return $criteria; @@ -75,7 +76,7 @@ public function prepareQueryBeforeCount(xPDOQuery $criteria) */ public function prepareRow(xPDOObject $object) { - return $object->toArray(); + return $object->toArray('', false, true); } /**