Commit 5712e8190db847541d8b7fb2cdfce44074589791

Authored by sergem
1 parent 963b9837

Added webservice for getting the transaction and history feed

Committed by: Serge Meunier
webservice/clienttools/services/0.9/kt.php
... ... @@ -1075,6 +1075,24 @@ Fatal error: Cannot unset string offsets in on line 981
1075 1075 $this->setResponse($response);
1076 1076 }
1077 1077  
  1078 + function get_transaction_history($params){
  1079 + $kt=&$this->KT;
  1080 +
  1081 + $document=&$kt->get_document_by_id($params['document_id']);
  1082 + if (PEAR::isError($document)){
  1083 + $this->setResponse(array('status_code'=>1, 'message'=>$document->getMessage()));
  1084 + return false;
  1085 + }
  1086 +
  1087 + $versions=$document->get_version_history();
  1088 + $transactions=$document->get_transaction_history();
  1089 + $response['status_code']=0;
  1090 + $response['transactions'] = $transactions;
  1091 + $response['versions'] = $versions;
  1092 + $this->setResponse($response);
  1093 + }
  1094 +
  1095 +
1078 1096  
1079 1097 public function get_users_groups($params){
1080 1098 $kt=&$this->KT;
... ...