Commit 1faa02636b96eecb5bbdec1b0876e1876814abc6
1 parent
66dca4c3
Fix broken links in child/descendant feeds
Story ID:2295472. Update KT CMIS implementation to 1.0 lib/api/compliance Committed by: Paul Barrett
Showing
3 changed files
with
11 additions
and
5 deletions
webservice/atompub/cmis/KT_cmis_atom_server.services.inc.php
| @@ -51,7 +51,9 @@ class KT_cmis_atom_service_folder extends KT_cmis_atom_service { | @@ -51,7 +51,9 @@ class KT_cmis_atom_service_folder extends KT_cmis_atom_service { | ||
| 51 | * This includes children and tree/descendant listings as well as individual folder retrieval | 51 | * This includes children and tree/descendant listings as well as individual folder retrieval |
| 52 | */ | 52 | */ |
| 53 | public function GET_action() | 53 | public function GET_action() |
| 54 | - { | 54 | + { |
| 55 | +// global $default; | ||
| 56 | +// $default->log->info($this->rawContent); | ||
| 55 | $repositoryId = KT_cmis_atom_service_helper::getRepositoryId($RepositoryService); | 57 | $repositoryId = KT_cmis_atom_service_helper::getRepositoryId($RepositoryService); |
| 56 | 58 | ||
| 57 | // TODO implement full path/node separation as with Alfresco - i.e. path requests come in on path/ and node requests come in on node/ | 59 | // TODO implement full path/node separation as with Alfresco - i.e. path requests come in on path/ and node requests come in on node/ |
webservice/atompub/cmis/KT_cmis_atom_service_helper.inc.php
| @@ -110,7 +110,6 @@ class KT_cmis_atom_service_helper { | @@ -110,7 +110,6 @@ class KT_cmis_atom_service_helper { | ||
| 110 | static public function createObjectEntry(&$feed, $cmisEntry, $parent, $pwc = false, $method = 'GET') | 110 | static public function createObjectEntry(&$feed, $cmisEntry, $parent, $pwc = false, $method = 'GET') |
| 111 | { | 111 | { |
| 112 | $workspace = $feed->getWorkspace(); | 112 | $workspace = $feed->getWorkspace(); |
| 113 | - $type = strtolower($cmisEntry['properties']['objectTypeId']['value']); | ||
| 114 | 113 | ||
| 115 | // create entry | 114 | // create entry |
| 116 | $entry = $feed->newEntry(); | 115 | $entry = $feed->newEntry(); |
| @@ -125,7 +124,7 @@ class KT_cmis_atom_service_helper { | @@ -125,7 +124,7 @@ class KT_cmis_atom_service_helper { | ||
| 125 | $entry->appendChild($feed->newAttr('xmlns:cmisra', 'http://docs.oasis-open.org/ns/cmis/restatom/200908/')); | 124 | $entry->appendChild($feed->newAttr('xmlns:cmisra', 'http://docs.oasis-open.org/ns/cmis/restatom/200908/')); |
| 126 | } | 125 | } |
| 127 | 126 | ||
| 128 | - self::createObjectEntryContent($entry, $feed, $cmisEntry, $parent, $pwc, $method); | 127 | + self::createObjectEntryContent($entry, $feed, $workspace, $cmisEntry, $parent, $pwc, $method); |
| 129 | } | 128 | } |
| 130 | 129 | ||
| 131 | /** | 130 | /** |
| @@ -157,7 +156,7 @@ class KT_cmis_atom_service_helper { | @@ -157,7 +156,7 @@ class KT_cmis_atom_service_helper { | ||
| 157 | 156 | ||
| 158 | // create entry | 157 | // create entry |
| 159 | $entry = $feed->newElement('entry'); | 158 | $entry = $feed->newElement('entry'); |
| 160 | - self::createObjectEntryContent($entry, $feed, $cmisEntry);//, $parent, $pwc, $method); | 159 | + self::createObjectEntryContent($entry, $feed, $workspace, $cmisEntry);//, $parent, $pwc, $method); |
| 161 | $childrenFeed->appendChild($entry); | 160 | $childrenFeed->appendChild($entry); |
| 162 | } | 161 | } |
| 163 | 162 | ||
| @@ -171,8 +170,10 @@ class KT_cmis_atom_service_helper { | @@ -171,8 +170,10 @@ class KT_cmis_atom_service_helper { | ||
| 171 | * @param boolean $pwc Whether this is a PWC object (will be returned slightly differently) | 170 | * @param boolean $pwc Whether this is a PWC object (will be returned slightly differently) |
| 172 | * @param string $method The calling method (slightly affects the output) | 171 | * @param string $method The calling method (slightly affects the output) |
| 173 | */ | 172 | */ |
| 174 | - static public function createObjectEntryContent($entry, &$feed, $cmisEntry, $parent = '', $pwc = false, $method = 'GET') | 173 | + static public function createObjectEntryContent($entry, &$feed, $workspace, $cmisEntry, $parent = '', $pwc = false, $method = 'GET') |
| 175 | { | 174 | { |
| 175 | + $type = $cmisEntry['properties']['objectTypeId']['value']; | ||
| 176 | + | ||
| 176 | // TODO dynamic actual creator name | 177 | // TODO dynamic actual creator name |
| 177 | $responseElement = $feed->newField('author'); | 178 | $responseElement = $feed->newField('author'); |
| 178 | $element = $feed->newField('name', 'admin', $responseElement); | 179 | $element = $feed->newField('name', 'admin', $responseElement); |
webservice/classes/atompub/cmis/KT_cmis_atom_server.inc.php
| @@ -166,6 +166,9 @@ class KT_cmis_atom_server extends KT_atom_server { | @@ -166,6 +166,9 @@ class KT_cmis_atom_server extends KT_atom_server { | ||
| 166 | header('Content-type: text/xml'); | 166 | header('Content-type: text/xml'); |
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | +// global $default; | ||
| 170 | +// $default->log->info($this->output); | ||
| 171 | + | ||
| 169 | if ($this->renderBody) { | 172 | if ($this->renderBody) { |
| 170 | echo $this->output; | 173 | echo $this->output; |
| 171 | } | 174 | } |