From 1b769083b0194cd30aa89bdc4a60326e2a0a83b9 Mon Sep 17 00:00:00 2001 From: Axel Stohn Date: Wed, 17 May 2023 10:12:19 -0700 Subject: [PATCH] AJAX cxhanges needed by Ryan --- Controller/GrouperGroupsController.php | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Controller/GrouperGroupsController.php b/Controller/GrouperGroupsController.php index 1e6df11..fd621c5 100644 --- a/Controller/GrouperGroupsController.php +++ b/Controller/GrouperGroupsController.php @@ -526,9 +526,6 @@ public function groupMemberApi() $finalData = $this->breakoutGroups($data); - $groupmemberships = $finalData['adHocGroups']; - $wgmemberships = $finalData['workingGroups']; - } catch (Exception $e) { CakeLog::write('error', __METHOD__ . ' Search: ' . var_export($e->getMessage(), true)); $this->response->type('json'); @@ -549,9 +546,6 @@ public function groupMemberApi() $finalData = $this->breakoutGroups($data); - $groupmemberships = $finalData['adHocGroups']; - $wgmemberships = $finalData['workingGroups']; - } catch (Exception $e) { CakeLog::write('error', __METHOD__ . ': ' . var_export($e->getMessage(), true)); $this->response->type('json'); @@ -565,10 +559,8 @@ public function groupMemberApi() } } - $this->set(compact('groupmemberships')); - $this->set(compact('wgmemberships')); - $this->set('_serialize', 'groupmemberships'); - $this->set('_serialize', 'wgmemberships'); + $this->set(compact('finalData')); + $this->set('_serialize', 'finalData'); } /** @@ -877,8 +869,8 @@ private function breakoutGroups(array $recordSet, $type = 'basic') } return array( - 'adHocGroups' => $notWGData, - 'workingGroups' => $wgData + 'adhoc' => $notWGData, + 'working' => $wgData ); }