From c7f0c85842b2166aefa057d07f2131c25434dbaa Mon Sep 17 00:00:00 2001 From: Brayan Osmar Pereyra Suxo Date: Thu, 26 Jul 2012 15:31:49 -0400 Subject: [PATCH] BUG 9069 Add variable to path in alfresco SOLVED - I add param in method uploadDoc, the param has the path in alfresco --- .../engine/classes/triggers/class.pmAlfrescoFunctions.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/workflow/engine/classes/triggers/class.pmAlfrescoFunctions.php b/workflow/engine/classes/triggers/class.pmAlfrescoFunctions.php index f8aa50311..27854d309 100755 --- a/workflow/engine/classes/triggers/class.pmAlfrescoFunctions.php +++ b/workflow/engine/classes/triggers/class.pmAlfrescoFunctions.php @@ -272,17 +272,19 @@ function getFolderChildren($alfrescoServerUrl, $folderId, $user, $pwd) { * @param string | $docType | Type of document to be Uploaded * @param string | $user | Valid Admin username to connect to Alfresco server * @param string | $pwd | Valid Admin password to connect to Alfresco server + * @param string | $ubicacion | Path of document to be Uploaded * * @return string | $result | Response * */ -function uploadDoc($alfrescoServerUrl, $fileSource, $title, $description, $docType, $user, $pwd) { +function uploadDoc($alfrescoServerUrl, $fileSource, $title, $description, $docType, $user, $pwd, $ubicacion = '') { $filep = fopen($fileSource,"r"); $fileLength = filesize($fileSource); $fileContent = fread($filep,$fileLength); $fileContent = base64_encode($fileContent); - $alfresco_url = "$alfrescoServerUrl/s/cmis/p/Sites/children"; + $ubicacion = ($ubicacion != '') ? $ubicacion . PATH_SEP : $ubicacion; + $alfresco_url = "$alfrescoServerUrl/s/cmis/p/Sites/" . $ubicacion . "children"; $xmlData = array(); $xmlData = ''.$title.''.$description.''.$fileContent.'cmis:document';