From 66b1daa1ba35cc69231e0cf32aab59c53dba9a31 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 26 Nov 2015 18:52:28 +0100 Subject: [PATCH] CoreApi: listObjects should return a list --- library/Director/Core/CoreApi.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/Director/Core/CoreApi.php b/library/Director/Core/CoreApi.php index 79955674..b5c2e9ec 100644 --- a/library/Director/Core/CoreApi.php +++ b/library/Director/Core/CoreApi.php @@ -60,12 +60,14 @@ class CoreApi { // TODO: more abstraction needed // TODO: autofetch and cache pluraltypes - return $this->client->get( + $result = $this->client->get( 'objects/' . $pluralType, array( - 'attrs' => array($type . '.__name', $type . '.name'), + 'attrs' => array('__name') ) )->getResult('name'); + + return array_keys($result); } public function getModules()