Commit 7ad57dc91208887cd7643d03df35a7a072e9f617

Authored by Paul Barrett
1 parent daa35381

Fix for service document collectionType tag

Story ID:2295472. Update KT CMIS implementation to 1.0 compliance

Committed by: Paul Barrett
webservice/classes/atompub/cmis/KT_cmis_atom_server.inc.php
@@ -116,12 +116,12 @@ class KT_cmis_atom_server extends KT_atom_server { @@ -116,12 +116,12 @@ class KT_cmis_atom_server extends KT_atom_server {
116 } 116 }
117 } 117 }
118 118
119 - ob_start();  
120 - readfile('C:\Users\Paul\Documents\Downloads\cmis_mod_kt.xml');  
121 - $this->output = ob_get_contents();  
122 - ob_end_clean(); 119 +// ob_start();
  120 +// readfile('C:\Users\Paul\Documents\Downloads\cmis_mod_kt.xml');
  121 +// $this->output = ob_get_contents();
  122 +// ob_end_clean();
123 123
124 -// $this->output = $service->getAPPdoc(); 124 + $this->output = $service->getAPPdoc();
125 } 125 }
126 126
127 public function registerService($workspace = NULL, $serviceName = NULL, $serviceClass = NULL, $title = NULL, 127 public function registerService($workspace = NULL, $serviceName = NULL, $serviceClass = NULL, $title = NULL,
@@ -159,21 +159,21 @@ class KT_cmis_atom_server extends KT_atom_server { @@ -159,21 +159,21 @@ class KT_cmis_atom_server extends KT_atom_server {
159 159
160 //include('/var/www/atompub_response.xml'); 160 //include('/var/www/atompub_response.xml');
161 161
162 - if (false && preg_match('/F1\-children/', $this->output)) {  
163 - readfile('C:\Users\Paul\Documents\Downloads\alfresco folder tree atompub response.xml');  
164 - }  
165 - else if (false && preg_match('/urn:uuid:checkedout/', $this->output)) {  
166 - readfile('C:\Users\Paul\Documents\Downloads\alfresco checkedout atompub response.xml');  
167 - }  
168 - else if (false && preg_match('/urn:uuid:types\-all/', $this->output)) {  
169 - readfile('C:\Users\Paul\Documents\Downloads\alfresco types atompub response.xml');  
170 - }  
171 - else if (false && preg_match('/\<service\>/', $this->output)) {  
172 - readfile('C:\Users\Paul\Documents\Downloads\cmis_mod_kt.xml');  
173 - }  
174 - else { 162 +// if (false && preg_match('/F1\-children/', $this->output)) {
  163 +// readfile('C:\Users\Paul\Documents\Downloads\alfresco folder tree atompub response.xml');
  164 +// }
  165 +// else if (false && preg_match('/urn:uuid:checkedout/', $this->output)) {
  166 +// readfile('C:\Users\Paul\Documents\Downloads\alfresco checkedout atompub response.xml');
  167 +// }
  168 +// else if (false && preg_match('/urn:uuid:types\-all/', $this->output)) {
  169 +// readfile('C:\Users\Paul\Documents\Downloads\alfresco types atompub response.xml');
  170 +// }
  171 +// else if (false && preg_match('/\<service\>/', $this->output)) {
  172 +// readfile('C:\Users\Paul\Documents\Downloads\cmis_mod_kt.xml');
  173 +// }
  174 +// else {
175 if ($this->renderBody) echo $this->output; 175 if ($this->renderBody) echo $this->output;
176 - } 176 +// }
177 } 177 }
178 178
179 } 179 }
webservice/classes/atompub/cmis/KT_cmis_atom_serviceDoc.inc.php
@@ -71,7 +71,7 @@ class KT_cmis_atom_serviceDoc extends KT_atom_serviceDoc { @@ -71,7 +71,7 @@ class KT_cmis_atom_serviceDoc extends KT_atom_serviceDoc {
71 $service = $this->newElement('service'); 71 $service = $this->newElement('service');
72 $service->appendChild($this->newAttr('xmlns', 'http://www.w3.org/2007/app')); 72 $service->appendChild($this->newAttr('xmlns', 'http://www.w3.org/2007/app'));
73 $service->appendChild($this->newAttr('xmlns:atom', 'http://www.w3.org/2005/Atom')); 73 $service->appendChild($this->newAttr('xmlns:atom', 'http://www.w3.org/2005/Atom'));
74 - $service->appendChild($this->newAttr('xmlns:cmis', 'http://docs.oasis-open.org/ns/cmis/core/200908')); 74 + $service->appendChild($this->newAttr('xmlns:cmis', 'http://docs.oasis-open.org/ns/cmis/core/200908/'));
75 $service->appendChild($this->newAttr('xmlns:cmisra', 'http://docs.oasis-open.org/ns/cmis/restatom/200908/')); 75 $service->appendChild($this->newAttr('xmlns:cmisra', 'http://docs.oasis-open.org/ns/cmis/restatom/200908/'));
76 $this->service =& $service; 76 $this->service =& $service;
77 $this->DOM->appendChild($this->service); 77 $this->DOM->appendChild($this->service);
@@ -81,8 +81,8 @@ class KT_cmis_atom_serviceDoc extends KT_atom_serviceDoc { @@ -81,8 +81,8 @@ class KT_cmis_atom_serviceDoc extends KT_atom_serviceDoc {
81 { 81 {
82 $collection=$this->newElement('collection'); 82 $collection=$this->newElement('collection');
83 $collection->appendChild($this->newAttr('href', $url)); 83 $collection->appendChild($this->newAttr('href', $url));
84 - $collection->appendChild($this->newAttr('cmisra:collectionType', $cmisCollectionType));  
85 $collection->appendChild($this->newElement('atom:title', $title)); 84 $collection->appendChild($this->newElement('atom:title', $title));
  85 + $collection->appendChild($this->newElement('cmisra:collectionType', $cmisCollectionType));
86 if (!is_null($accept)) { 86 if (!is_null($accept)) {
87 $collection->appendChild($this->newElement('accept', $accept)); 87 $collection->appendChild($this->newElement('accept', $accept));
88 } 88 }