diff --git a/gulliver/system/class.soapNtlm.php b/gulliver/system/class.soapNtlm.php
index 6cf88a1c8..95fa857ca 100644
--- a/gulliver/system/class.soapNtlm.php
+++ b/gulliver/system/class.soapNtlm.php
@@ -51,19 +51,10 @@ class soapNtlm {
* @return unknown
*/
public function stream_open($path, $mode, $options, $opened_path) {
- echo "[NTLMStream::stream_open] $path , mode=$mode \n";
-
- $authPath=explode("|", urldecode($path));
- G::pr($authPath);
- $path=$authPath[0];
- G::pr($path);
- $authO=explode(":",$authPath[1]);
- G::pr($authO);
-
+ //echo "[NTLMStream::stream_open] $path , mode=$mode
";
+//G::pr($options);
$this->path = $path;
- $this->user=$authO[0];
- $this->password=$authO[1];
$this->mode = $mode;
$this->options = $options;
$this->opened_path = $opened_path;
@@ -78,7 +69,7 @@ class soapNtlm {
*
*/
public function stream_close() {
- echo "[NTLMStream::stream_close] \n";
+ //echo "[NTLMStream::stream_close]
";
curl_close($this->ch);
}
@@ -89,7 +80,7 @@ class soapNtlm {
* @return content from pos to count
*/
public function stream_read($count) {
- echo "[NTLMStream::stream_read] $count \n";
+ //echo "[NTLMStream::stream_read] $count
";
if (strlen($this->buffer) == 0) {
return false;
}
@@ -108,7 +99,7 @@ class soapNtlm {
* @return content from pos to count
*/
public function stream_write($data) {
- echo "[NTLMStream::stream_write] \n";
+ //echo "[NTLMStream::stream_write]
";
if (strlen($this->buffer) == 0) {
return false;
}
@@ -120,13 +111,13 @@ class soapNtlm {
* @return true if eof else false
*/
public function stream_eof() {
- echo "[NTLMStream::stream_eof] ";
+ //echo "[NTLMStream::stream_eof] ";
if ($this->pos > strlen($this->buffer)) {
- echo "true \n";
+ //echo "true
";
return true;
}
- echo "false \n";
+ //echo "false
";
return false;
}
@@ -134,7 +125,7 @@ class soapNtlm {
* @return int the position of the current read pointer
*/
public function stream_tell() {
- echo "[NTLMStream::stream_tell] \n";
+ //echo "[NTLMStream::stream_tell]
";
return $this->pos;
}
@@ -142,7 +133,7 @@ class soapNtlm {
* Flush stream data
*/
public function stream_flush() {
- echo "[NTLMStream::stream_flush] \n";
+ //echo "[NTLMStream::stream_flush]
";
$this->buffer = null;
$this->pos = null;
}
@@ -153,7 +144,7 @@ class soapNtlm {
* @return array stat information
*/
public function stream_stat() {
- echo "[NTLMStream::stream_stat] \n";
+ //echo "[NTLMStream::stream_stat]
";
$this->createBuffer($this->path);
$stat = array(
@@ -169,16 +160,9 @@ class soapNtlm {
* @return array stat information
*/
public function url_stat($path, $flags) {
- echo "[NTLMStream::url_stat] -> $path \n";
- $authPath=explode("|", urldecode($path));
- G::pr($authPath);
- $path=$authPath[0];
- G::pr($path);
- $authO=explode(":",$authPath[1]);
- G::pr($authO);
- $this->user=$authO[0];
- $this->password=$authO[1];
- $this->createBuffer($this->path);
+ //G::pr($this->options);
+ //echo "[NTLMStream::url_stat] -> $path
";
+ $this->createBuffer($path);
$stat = array(
'size' => strlen($this->buffer),
);
@@ -196,16 +180,16 @@ class soapNtlm {
return;
}
- echo "[NTLMStream::createBuffer] create buffer from : $path \n";
+ //echo "[NTLMStream::createBuffer] create buffer from : $path
";
$this->ch = curl_init($this->path);
curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($this->ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($this->ch, CURLOPT_HTTPAUTH, CURLAUTH_NTLM);
- curl_setopt($this->ch, CURLOPT_USERPWD, $this->user . ':' . $this->password);
-G::pr($this->ch);
+ curl_setopt($this->ch, CURLOPT_USERPWD, $this->options['auth']);
+
echo $this->buffer = curl_exec($this->ch);
- echo "[NTLMStream::createBuffer] buffer size : " . strlen($this->buffer) . "bytes\n";
+ //echo "[NTLMStream::createBuffer] buffer size : " . strlen($this->buffer) . "bytes
";
$this->pos = 0;
}
@@ -213,8 +197,8 @@ G::pr($this->ch);
class NTLMSoapClient extends SoapClient {
- function __doRequest($request, $location, $action, $version) {
+ function __doRequest($request, $location, $action, $version) {
$headers = array(
'Method: POST',
'Connection: Keep-Alive',
@@ -233,7 +217,7 @@ class NTLMSoapClient extends SoapClient {
curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_NTLM);
- curl_setopt($ch, CURLOPT_USERPWD, $this->user . ':' . $this->password);
+ curl_setopt($ch, CURLOPT_USERPWD, $this->options['auth']);
$response = curl_exec($ch);
return $response;
diff --git a/workflow/engine/classes/triggers/class.pmSharepointFunctions.php b/workflow/engine/classes/triggers/class.pmSharepointFunctions.php
index 10d4c4841..a41a122ef 100644
--- a/workflow/engine/classes/triggers/class.pmSharepointFunctions.php
+++ b/workflow/engine/classes/triggers/class.pmSharepointFunctions.php
@@ -19,7 +19,7 @@
/**
* Sharepoint Triggers that allow ProcessMaker to perform common DWS actions
* @class pmTrSharepoint
- * @name Sharepoint DWS Triggers
+ * @name Sharepoint DWS Triggers v. 0.1
* @icon /images/triggers/sharepoint.gif
* @className class.pmTrSharepoint.pmFunctions.php
*/
@@ -43,7 +43,7 @@
*
*/
function createDWS($sharepointServer, $auth, $name="", $users="", $title="", $documents="", $result="") {
- print "Trigger: createDWS";
+ //print "Trigger: createDWS";
require_once(PATH_CORE. 'classes' . PATH_SEP.'triggers' . PATH_SEP . 'class.pmTrSharepoint.php');
$pmTrSharepoint = new pmTrSharepointClass($sharepointServer, $auth);
$beforeResult = $pmTrSharepoint->createDWS($name, $users, $title, $documents);