Commit d8798e7e7533902d5d1b869c8774d5f7b17daff0

Authored by sergem
1 parent 6ea214d7

Made the copy, move and delete functions in the client tools webservice api hand…

…le reasons passed to them

Committed by: Serge Meunier
webservice/clienttools/services/0.2/kt.php
... ... @@ -1117,7 +1117,7 @@ class kt extends client_service {
1117 1117 function copydocument($params){
1118 1118 $kt=&$this->KT;
1119 1119  
1120   - $response=$kt->copy_document($params['documentid'], $params['destfolderid']);
  1120 + $response=$kt->copy_document($params['documentid'], $params['destfolderid'], $params['reason']);
1121 1121 if ($response['status_code']==0) {
1122 1122 $this->setResponse(array('status_code'=>0, 'status'=>'itemupdated', 'icon'=>'success', 'title'=>$this->xlate('Document Copied'), 'message'=>$this->xlate('Document has been successfully copied')));
1123 1123 return true;
... ... @@ -1130,7 +1130,7 @@ class kt extends client_service {
1130 1130 function movedocument($params){
1131 1131 $kt=$this->KT;
1132 1132  
1133   - $response=$kt->move_document($params['documentid'], $params['destfolderid']);
  1133 + $response=$kt->move_document($params['documentid'], $params['destfolderid'], $params['reason']);
1134 1134 if ($response['status_code']==0) {
1135 1135 $this->setResponse(array('status_code'=>0, 'status'=>'itemupdated', 'icon'=>'success', 'title'=>$this->xlate('Document Moved'), 'message'=>$this->xlate('Document has been successfully moved')));
1136 1136 return true;
... ... @@ -1144,7 +1144,7 @@ class kt extends client_service {
1144 1144 function copyfolder($params){
1145 1145 $kt=&$this->KT;
1146 1146  
1147   - $response=$kt->copy_folder($params['sourcefolderid'], $params['destfolderid']);
  1147 + $response=$kt->copy_folder($params['sourcefolderid'], $params['destfolderid'], $params['reason']);
1148 1148 if ($response['status_code']==0) {
1149 1149 $this->setResponse(array('status_code'=>0, 'status'=>'itemupdated', 'icon'=>'success', 'title'=>$this->xlate('Folder Copied'), 'message'=>$this->xlate('Folder has been successfully copied')));
1150 1150 return true;
... ... @@ -1158,7 +1158,7 @@ class kt extends client_service {
1158 1158 function movefolder($params){
1159 1159 $kt=&$this->KT;
1160 1160  
1161   - $response=$kt->move_folder($params['sourcefolderid'], $params['destfolderid']);
  1161 + $response=$kt->move_folder($params['sourcefolderid'], $params['destfolderid'], $params['reason']);
1162 1162 if ($response['status_code']==0) {
1163 1163 $this->setResponse(array('status_code'=>0, 'status'=>'itemupdated', 'icon'=>'success', 'title'=>$this->xlate('Folder Moved'), 'message'=>$this->xlate('Folder has been successfully moved')));
1164 1164 return true;
... ... @@ -1193,7 +1193,7 @@ class kt extends client_service {
1193 1193 function deletefolder($params){
1194 1194 $kt=&$this->KT;
1195 1195  
1196   - $response=$kt->delete_folder($params['folderid'], 'Deleted from office addin');
  1196 + $response=$kt->delete_folder($params['folderid'], $params['reason']);
1197 1197 if ($response['status_code']==0) {
1198 1198 $this->setResponse(array('status_code'=>0, 'status'=>'folderdeleted', 'icon'=>'success', 'title'=>$this->xlate('Folder Deleted'), 'message'=>$this->xlate('Folder has been successfully deleted')));
1199 1199 return true;
... ...