diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-01-24 22:09:13 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-01-24 22:09:13 -0500 |
commit | fa5c12a61d89769ace452cb4164f35e09d750adf (patch) | |
tree | bda9a9d21d5184a107f0fe1ffa630391b0f4ad51 | |
parent | 81d14efbd1627827a826eecd54fb17121f952921 (diff) |
Empty arrays are serialized to a list instead of a dict (Json API)
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | app/Api/Procedure/ActionProcedure.php | 6 | ||||
-rw-r--r-- | app/Api/Procedure/MeProcedure.php | 2 | ||||
-rw-r--r-- | app/Api/Procedure/ProjectPermissionProcedure.php | 4 | ||||
-rw-r--r-- | app/Api/Procedure/TaskMetadataProcedure.php | 2 | ||||
-rw-r--r-- | app/Api/Procedure/TaskTagProcedure.php | 2 |
6 files changed, 9 insertions, 8 deletions
@@ -17,6 +17,7 @@ Regressions: Bug fixes: * Fix wrong datetime formatting when task form shows validation errors +* Empty arrays are serialized to a list instead of a dict (Json API) Version 1.0.37 (Jan 14, 2017) ----------------------------- diff --git a/app/Api/Procedure/ActionProcedure.php b/app/Api/Procedure/ActionProcedure.php index 4043dbb9..72fb9bbe 100644 --- a/app/Api/Procedure/ActionProcedure.php +++ b/app/Api/Procedure/ActionProcedure.php @@ -15,17 +15,17 @@ class ActionProcedure extends BaseProcedure { public function getAvailableActions() { - return $this->actionManager->getAvailableActions(); + return (object) $this->actionManager->getAvailableActions(); } public function getAvailableActionEvents() { - return $this->eventManager->getAll(); + return (object) $this->eventManager->getAll(); } public function getCompatibleActionEvents($action_name) { - return $this->actionManager->getCompatibleEvents($action_name); + return (object) $this->actionManager->getCompatibleEvents($action_name); } public function removeAction($action_id) diff --git a/app/Api/Procedure/MeProcedure.php b/app/Api/Procedure/MeProcedure.php index e59e6522..71d5555b 100644 --- a/app/Api/Procedure/MeProcedure.php +++ b/app/Api/Procedure/MeProcedure.php @@ -54,7 +54,7 @@ class MeProcedure extends BaseProcedure public function getMyProjectsList() { - return $this->projectUserRoleModel->getProjectsByUser($this->userSession->getId()); + return (object) $this->projectUserRoleModel->getProjectsByUser($this->userSession->getId()); } public function getMyOverdueTasks() diff --git a/app/Api/Procedure/ProjectPermissionProcedure.php b/app/Api/Procedure/ProjectPermissionProcedure.php index e22e1d62..1938a067 100644 --- a/app/Api/Procedure/ProjectPermissionProcedure.php +++ b/app/Api/Procedure/ProjectPermissionProcedure.php @@ -16,13 +16,13 @@ class ProjectPermissionProcedure extends BaseProcedure public function getProjectUsers($project_id) { ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'getProjectUsers', $project_id); - return $this->projectUserRoleModel->getAllUsers($project_id); + return (object) $this->projectUserRoleModel->getAllUsers($project_id); } public function getAssignableUsers($project_id, $prepend_unassigned = false) { ProjectAuthorization::getInstance($this->container)->check($this->getClassName(), 'getAssignableUsers', $project_id); - return $this->projectUserRoleModel->getAssignableUsersList($project_id, $prepend_unassigned); + return (object) $this->projectUserRoleModel->getAssignableUsersList($project_id, $prepend_unassigned); } public function addProjectUser($project_id, $user_id, $role = Role::PROJECT_MEMBER) diff --git a/app/Api/Procedure/TaskMetadataProcedure.php b/app/Api/Procedure/TaskMetadataProcedure.php index 169482f5..ab6c32d0 100644 --- a/app/Api/Procedure/TaskMetadataProcedure.php +++ b/app/Api/Procedure/TaskMetadataProcedure.php @@ -15,7 +15,7 @@ class TaskMetadataProcedure extends BaseProcedure public function getTaskMetadata($task_id) { TaskAuthorization::getInstance($this->container)->check($this->getClassName(), 'getTask', $task_id); - return $this->taskMetadataModel->getAll($task_id); + return (object) $this->taskMetadataModel->getAll($task_id); } public function getTaskMetadataByName($task_id, $name) diff --git a/app/Api/Procedure/TaskTagProcedure.php b/app/Api/Procedure/TaskTagProcedure.php index 8596f507..55dac8d4 100644 --- a/app/Api/Procedure/TaskTagProcedure.php +++ b/app/Api/Procedure/TaskTagProcedure.php @@ -21,6 +21,6 @@ class TaskTagProcedure extends BaseProcedure public function getTaskTags($task_id) { TaskAuthorization::getInstance($this->container)->check($this->getClassName(), 'getTaskTags', $task_id); - return $this->taskTagModel->getList($task_id); + return (object) $this->taskTagModel->getList($task_id); } } |