From 6495c80513a9a89eb437d0dbdf12af790d5795f1 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Fri, 15 Mar 2013 10:02:33 +0200 Subject: Added fileData support for createCarryInRepair() --- gsxlib.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gsxlib.php') diff --git a/gsxlib.php b/gsxlib.php index 43ba53a..fae862e 100644 --- a/gsxlib.php +++ b/gsxlib.php @@ -192,6 +192,16 @@ class GsxLib public function createCarryInRepair($repairData) { + if( $repairData['fileData'] && file_exists( $repairData['fileData'] )) + { + $fp = $repairData['fileData']; + $fh = fopen($fp, "r"); + $contents = fread($fh, filesize($fp)); + $repairData['fileData'] = $contents; + $repairData['fileName'] = basename($fp); + fclose($fh); + } + $resp = $this->client->CreateCarryInRepair( array('CreateCarryInRequest' => array( 'userSession' => array('userSessionId' => $this->getSessionId()), -- cgit v1.2.3