Commit d30cd1271477a2eb6aaaedfa67fc8e2c383609cb
1 parent
4e00c663
Fetch and use argument for depth on getDescendants call
Story ID:2295472. Update KT CMIS implementation to 1.0 lib/api/compliance Committed by: Paul Barrett
Showing
1 changed file
with
8 additions
and
2 deletions
webservice/atompub/cmis/KT_cmis_atom_server.services.inc.php
| @@ -330,8 +330,14 @@ class KT_cmis_atom_service_folder extends KT_cmis_atom_service { | @@ -330,8 +330,14 @@ class KT_cmis_atom_service_folder extends KT_cmis_atom_service { | ||
| 330 | $entries = $NavigationService->getChildren($repositoryId, $folderId, false, false); | 330 | $entries = $NavigationService->getChildren($repositoryId, $folderId, false, false); |
| 331 | } | 331 | } |
| 332 | else if ($feedType == 'descendants') { | 332 | else if ($feedType == 'descendants') { |
| 333 | - // TODO how will client request depth? | ||
| 334 | - $entries = $NavigationService->getDescendants($repositoryId, $folderId); | 333 | + // TODO how will client request depth? for now we assume as part of the url - will probably be covered by URI templates |
| 334 | + if (isset($this->params[2])) { | ||
| 335 | + $entries = $NavigationService->getDescendants($repositoryId, $folderId, $this->params[2]); | ||
| 336 | + | ||
| 337 | + } | ||
| 338 | + else { | ||
| 339 | + $entries = $NavigationService->getDescendants($repositoryId, $folderId); | ||
| 340 | + } | ||
| 335 | } | 341 | } |
| 336 | else { | 342 | else { |
| 337 | // error, we shouldn't be here, if we are then the wrong service/function was called | 343 | // error, we shouldn't be here, if we are then the wrong service/function was called |