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,7 +1117,7 @@ class kt extends client_service {
1117 function copydocument($params){ 1117 function copydocument($params){
1118 $kt=&$this->KT; 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 if ($response['status_code']==0) { 1121 if ($response['status_code']==0) {
1122 $this->setResponse(array('status_code'=>0, 'status'=>'itemupdated', 'icon'=>'success', 'title'=>$this->xlate('Document Copied'), 'message'=>$this->xlate('Document has been successfully copied'))); 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 return true; 1123 return true;
@@ -1130,7 +1130,7 @@ class kt extends client_service { @@ -1130,7 +1130,7 @@ class kt extends client_service {
1130 function movedocument($params){ 1130 function movedocument($params){
1131 $kt=$this->KT; 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 if ($response['status_code']==0) { 1134 if ($response['status_code']==0) {
1135 $this->setResponse(array('status_code'=>0, 'status'=>'itemupdated', 'icon'=>'success', 'title'=>$this->xlate('Document Moved'), 'message'=>$this->xlate('Document has been successfully moved'))); 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 return true; 1136 return true;
@@ -1144,7 +1144,7 @@ class kt extends client_service { @@ -1144,7 +1144,7 @@ class kt extends client_service {
1144 function copyfolder($params){ 1144 function copyfolder($params){
1145 $kt=&$this->KT; 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 if ($response['status_code']==0) { 1148 if ($response['status_code']==0) {
1149 $this->setResponse(array('status_code'=>0, 'status'=>'itemupdated', 'icon'=>'success', 'title'=>$this->xlate('Folder Copied'), 'message'=>$this->xlate('Folder has been successfully copied'))); 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 return true; 1150 return true;
@@ -1158,7 +1158,7 @@ class kt extends client_service { @@ -1158,7 +1158,7 @@ class kt extends client_service {
1158 function movefolder($params){ 1158 function movefolder($params){
1159 $kt=&$this->KT; 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 if ($response['status_code']==0) { 1162 if ($response['status_code']==0) {
1163 $this->setResponse(array('status_code'=>0, 'status'=>'itemupdated', 'icon'=>'success', 'title'=>$this->xlate('Folder Moved'), 'message'=>$this->xlate('Folder has been successfully moved'))); 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 return true; 1164 return true;
@@ -1193,7 +1193,7 @@ class kt extends client_service { @@ -1193,7 +1193,7 @@ class kt extends client_service {
1193 function deletefolder($params){ 1193 function deletefolder($params){
1194 $kt=&$this->KT; 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 if ($response['status_code']==0) { 1197 if ($response['status_code']==0) {
1198 $this->setResponse(array('status_code'=>0, 'status'=>'folderdeleted', 'icon'=>'success', 'title'=>$this->xlate('Folder Deleted'), 'message'=>$this->xlate('Folder has been successfully deleted'))); 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 return true; 1199 return true;