diff --git a/phpgwapi/inc/class.soap_client.inc.php b/phpgwapi/inc/class.soap_client.inc.php index 41350d1655..7242127842 100644 --- a/phpgwapi/inc/class.soap_client.inc.php +++ b/phpgwapi/inc/class.soap_client.inc.php @@ -26,7 +26,7 @@ class soap_client $this->server = $server; $this->errno; $this->errstring; - $this->debug_flag = False; + $this->debug_flag = True; $this->debug_str = ""; $this->username = ""; $this->password = ""; diff --git a/phpgwapi/inc/class.soap_parser.inc.php b/phpgwapi/inc/class.soap_parser.inc.php index 7756fa1de5..5b30b8859f 100644 --- a/phpgwapi/inc/class.soap_parser.inc.php +++ b/phpgwapi/inc/class.soap_parser.inc.php @@ -23,7 +23,7 @@ class soap_parser $this->fault_detail = ""; $this->eval_str = ""; $this->depth_array = array(); - $this->debug_flag = False; + $this->debug_flag = True; $this->debug_str = ""; $this->previous_element = ""; diff --git a/phpgwapi/inc/class.soap_server.inc.php b/phpgwapi/inc/class.soap_server.inc.php index d4ac35641d..46562d6442 100644 --- a/phpgwapi/inc/class.soap_server.inc.php +++ b/phpgwapi/inc/class.soap_server.inc.php @@ -52,7 +52,6 @@ class soap_server $header[] = "Connection: Close\r\n"; $header[] = "Content-Type: text/xml; charset=UTF-8\r\n"; $header[] = "Content-Length: ".strlen($payload)."\r\n\r\n"; - reset($header); foreach($header as $hdr) { header($hdr); diff --git a/phpgwapi/inc/class.soapclient.inc.php b/phpgwapi/inc/class.soapclient.inc.php index c83c5ee6d2..4425915307 100644 --- a/phpgwapi/inc/class.soapclient.inc.php +++ b/phpgwapi/inc/class.soapclient.inc.php @@ -19,7 +19,7 @@ class soapclient { function soapclient($endpoint,$wsdl=False,$portName=False) { - $this->debug_flag = False; + $this->debug_flag = True; $this->endpoint = $endpoint; $this->portName = False; @@ -106,8 +106,7 @@ class soapclient { $this->debug("got fault"); $faultArray = $return->decode(); - while(list($k,$v) = each($faultArray)) - /* foreach($faultArray as $k => $v) */ + foreach($faultArray as $k => $v) { print "$k = $v
"; } diff --git a/phpgwapi/inc/class.soapmsg.inc.php b/phpgwapi/inc/class.soapmsg.inc.php index a5445e2d99..43c64470d5 100644 --- a/phpgwapi/inc/class.soapmsg.inc.php +++ b/phpgwapi/inc/class.soapmsg.inc.php @@ -14,23 +14,21 @@ class soapmsg { global $namespaces; $i = count($namespaces); - while(list($v) = each($new_namespaces)) - /* foreach($new_namespaces as $v) */ + foreach($new_namespaces as $v) { $namespaces[$v] = "ns".$i++; } $this->namespaces = $namespaces; } $this->payload = ''; - $this->debug_flag = False; + $this->debug_flag = True; $this->debug_str = "entering soapmsg() with soapval ".$this->value->name."\n"; } function make_envelope($payload) { global $namespaces; - while(list($k,$v) = each($namespaces)) - /* foreach($namespaces as $k => $v) */ + foreach($namespaces as $k => $v) { $ns_string .= " xmlns:$v=\"$k\""; } diff --git a/phpgwapi/inc/class.soapval.inc.php b/phpgwapi/inc/class.soapval.inc.php index febfad92c5..e10280d7ec 100644 --- a/phpgwapi/inc/class.soapval.inc.php +++ b/phpgwapi/inc/class.soapval.inc.php @@ -46,7 +46,7 @@ class soapval $this->type_code = 0; $this->type_prefix = false; $this->array_type = ""; - $this->debug_flag = False; + $this->debug_flag = True; $this->debug_str = ""; $this->debug("Entering soapval - name: '$name' type: '$type'"); @@ -139,8 +139,7 @@ class soapval $this->value = array(); if(is_array($vals) && count($vals) >= 1) { - while(list($k,$v) = each($vals)) - /* foreach($vals as $k => $v) */ + foreach($vals as $k => $v) { $this->debug("checking value $k : $v"); // if soapval, add.. @@ -193,8 +192,7 @@ class soapval $this->debug("adding struct '$this->name' with ".count($vals)." vals"); if(is_array($vals) && count($vals) >= 1) { - while(list($k,$v) = each($vals)) - /* foreach($vals as $k => $v) */ + foreach($vals as $k => $v) { // if serialize, if soapval if(get_class($v) == "soapval") @@ -207,8 +205,7 @@ class soapval { if(is_array($v)) { - while(list($a,$b) = each($v)) - /* foreach($v as $a => $b) */ + foreach($v as $a => $b) { if($a == "0") { @@ -288,8 +285,7 @@ class soapval } if(is_array($soapval->value)) { - while(list($k,$v) = each($soapval->value)) - /* foreach($soapval->value as $k => $v) */ + foreach($soapval->value as $k => $v) { $xml .= $this->serializeval($v); } @@ -305,9 +301,7 @@ class soapval break; case 2: // array - reset($soapval->value); - while($array_val = each($soapval->value)) - /* foreach($soapval->value as $array_val) */ + foreach($soapval->value as $array_val) { $array_types[$array_val->type] = 1; $xml .= $this->serializeval($array_val); @@ -354,9 +348,7 @@ class soapval { if(is_array($soapval->value)) { - reset($soapval->value); - while($item = each($soapval->value)) - /* foreach($soapval->value as $item) */ + foreach($soapval->value as $item) { $return[] = $this->decode($item); } @@ -372,9 +364,7 @@ class soapval { if(is_array($soapval->value)) { - reset($soapval->value); - while($item = each($soapval->value)) - /* foreach($soapval->value as $item) */ + foreach($soapval->value as $item) { $return[$item->name] = $this->decode($item); } @@ -394,9 +384,7 @@ class soapval { global $namespaces,$soapTypes,$typemap; - reset($typemap); - while(list($namespace,$types) = each($typemap)) - /* foreach($typemap as $namespace => $types) */ + foreach($typemap as $namespace => $types) { if(in_array($type,$types)) {