Try this solution to this problem in ZuckerDoc 2.0d:
Modified the <sugarroot>/modules/ZuckerDocs/dms/ktwsapi/vendor/ktwsapi.inc.php
file so the previously uploaded document can be downloaded.
Look for the download() function around line 781.
Here's the revised version:
| Code: |
function download($version=null, $localpath=null)
{
if (is_null($localpath))
{
$localpath = $this->ktapi->get_download_path();
}
if (!is_dir($localpath))
{
return new PEAR_Error('local path does not exist');
}
if (!is_writable($localpath))
{
return new PEAR_Error('local path is not writable');
}
$kt_response = $this->ktapi->soapclient->download_document($this->ktapi->session, $this->document_id);
if (SOAP_Client::isError($kt_response))
{
return $kt_response;
}
if ($kt_response->status_code != 0)
{
return new PEAR_Error($kt_response->message);
}
$url = KT_URL;
$url .= $kt_response->message;
$response = $this->_download_file($url, $localpath, $this->filename);
if (PEAR::isError($response))
{
return new PEAR_Error($kt_response->message);
}
return true;
}
|
Check other $url parameters to make sure the check-out / check-in documents work also.