Home arrow Forum
Discussion
Welcome, Guest
Please Login or Register.    Lost Password?
Re:ZuckerDoc 2.0d cannot Show / Download document from Sugar? (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:ZuckerDoc 2.0d cannot Show / Download document from Sugar?
#21
Developer (User)
Fresh Boarder
Posts: 10
graph
User Offline Click here to see the profile of this user
Re:ZuckerDoc 2.0d cannot Show / Download document from Sugar? 3 Years, 7 Months ago Karma: 0  
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.
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/07/11 11:36 By greenwave.
  The administrator has disabled public write access.
      Topics Author Date
    thread link
ZuckerDoc 2.0d cannot Show / Download document from Sugar?
sugarcup 2008/07/10 16:48
    thread link
thread linkthread link Re:ZuckerDoc 2.0d cannot Show / Download document from Sugar?
greenwave 2008/07/11 11:32
Go to top Post Reply
get the latest posts directly to your desktop