diff --git a/module/project/control.php b/module/project/control.php index afa1df8da9..f76ebe2e71 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1269,10 +1269,7 @@ class project extends control $this->app->session->set('storyList', $uri); $this->app->session->set('projectList', $uri); - if($type === 'json') - { - die(json_encode($tree, JSON_HEX_QUOT | JSON_HEX_APOS)); - } + if($type === 'json') die(helper::jsonEncode4Parse($tree, JSON_HEX_QUOT | JSON_HEX_APOS)); $this->view->title = $this->lang->project->tree; $this->view->position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name); diff --git a/module/project/model.php b/module/project/model.php index 8b33688f60..1e737a8c27 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -2361,6 +2361,6 @@ class projectModel extends model } } if(empty($fullTrees[0]->children)) array_shift($fullTrees); - return $fullTrees; + return array_values($fullTrees); } }