diff --git a/inc/DAVResource.php b/inc/DAVResource.php index c5d646f9..a6509112 100644 --- a/inc/DAVResource.php +++ b/inc/DAVResource.php @@ -737,8 +737,7 @@ EOQRY; } } xml_parser_free($xml_parser); - $position = 0; - $xmltree = BuildXMLTree( $xml_tags, $position); + $xmltree = BuildXMLTree( $xml_tags ); return $xmltree->GetContent(); } diff --git a/inc/autodiscover-handler.php b/inc/autodiscover-handler.php index 65f5ba87..b436e343 100644 --- a/inc/autodiscover-handler.php +++ b/inc/autodiscover-handler.php @@ -47,8 +47,7 @@ ERROR; if ( !isset($request->xml_tags) ) errorResponse( 406, translate("Body contains no XML data!") ); -$position = 0; -$xmltree = BuildXMLTree( $request->xml_tags, $position); +$xmltree = BuildXMLTree( $request->xml_tags ); if ( !is_object($xmltree) ) errorResponse( 406, translate("REPORT body is not valid XML data!") ); diff --git a/inc/caldav-ACL.php b/inc/caldav-ACL.php index 54ae8dcc..861d4389 100644 --- a/inc/caldav-ACL.php +++ b/inc/caldav-ACL.php @@ -88,8 +88,7 @@ $resource = new DAVResource( $request->path ); would allow unauthenticated access to resources. */ -$position = 0; -$xmltree = BuildXMLTree( $request->xml_tags, $position); +$xmltree = BuildXMLTree( $request->xml_tags ); $aces = $xmltree->GetPath("/DAV::acl/*"); $grantor = new DAVResource($request->path); diff --git a/inc/caldav-BIND.php b/inc/caldav-BIND.php index 6de1f25e..94328a2c 100644 --- a/inc/caldav-BIND.php +++ b/inc/caldav-BIND.php @@ -28,8 +28,7 @@ if ( ! $parent->Exists() || $parent->IsSchedulingCollection() ) { require_once('XMLDocument.php'); $reply = new XMLDocument(array( 'DAV:' => '' )); -$position = 0; -$xmltree = BuildXMLTree( $request->xml_tags, $position); +$xmltree = BuildXMLTree( $request->xml_tags ); $segment = $xmltree->GetElements('DAV::segment'); $segment = $segment[0]->GetContent(); diff --git a/inc/caldav-MKCOL.php b/inc/caldav-MKCOL.php index 4875c6c2..de87f849 100644 --- a/inc/caldav-MKCOL.php +++ b/inc/caldav-MKCOL.php @@ -52,8 +52,7 @@ if ( isset($request->xml_tags) ) { /** * The MKCOL request may contain XML to set some DAV properties */ - $position = 0; - $xmltree = BuildXMLTree( $request->xml_tags, $position); + $xmltree = BuildXMLTree( $request->xml_tags ); if ( $xmltree->GetNSTag() == 'DAV::mkcol' ) $request_type = 'extended-mkcol'; if ( $xmltree->GetNSTag() != 'urn:ietf:params:xml:ns:caldav:mkcalendar' && $request_type != 'extended-mkcol' ) { diff --git a/inc/caldav-MKTICKET.php b/inc/caldav-MKTICKET.php index 2f5717b0..6455c04a 100644 --- a/inc/caldav-MKTICKET.php +++ b/inc/caldav-MKTICKET.php @@ -34,7 +34,7 @@ if ( ! isset($request->xml_tags) ) { $request->XMLResponse( 400, new XMLElement( 'error', new XMLElement('missing-xml-for-request'), $reply->GetXmlNsArray() ) ); } -$xmltree = BuildXMLTree( $request->xml_tags, $position); +$xmltree = BuildXMLTree( $request->xml_tags ); if ( $xmltree->GetNSTag() != 'http://www.xythos.com/namespaces/StorageServer:ticketinfo' && $xmltree->GetNSTag() != 'DAV::ticketinfo' ) { $request->XMLResponse( 400, new XMLElement( 'error', new XMLElement('invalid-xml-for-request'), $reply->GetXmlNsArray() ) ); diff --git a/inc/caldav-PROPFIND.php b/inc/caldav-PROPFIND.php index 887ec5de..6e714c7c 100644 --- a/inc/caldav-PROPFIND.php +++ b/inc/caldav-PROPFIND.php @@ -23,8 +23,7 @@ if ( !isset($request->xml_tags) ) { $property_list = array('DAV::allprop'); } else { - $position = 0; - $xmltree = BuildXMLTree( $request->xml_tags, $position); + $xmltree = BuildXMLTree( $request->xml_tags ); if ( !is_object($xmltree) ) { $request->DoResponse( 403, translate("Request body is not valid XML data!") ); } diff --git a/inc/caldav-PROPPATCH.php b/inc/caldav-PROPPATCH.php index 7bda9408..7b55cbba 100644 --- a/inc/caldav-PROPPATCH.php +++ b/inc/caldav-PROPPATCH.php @@ -21,8 +21,7 @@ if ( !$dav_resource->HavePrivilegeTo('DAV::write-properties') ) { } } -$position = 0; -$xmltree = BuildXMLTree( $request->xml_tags, $position); +$xmltree = BuildXMLTree( $request->xml_tags ); // echo $xmltree->Render(); diff --git a/inc/caldav-REPORT.php b/inc/caldav-REPORT.php index ec07d406..f685f13f 100644 --- a/inc/caldav-REPORT.php +++ b/inc/caldav-REPORT.php @@ -26,8 +26,7 @@ if ( ! ini_get('open_basedir') && (isset($c->dbg['ALL']) || (isset($c->dbg['repo if ( !isset($request->xml_tags) ) { $request->DoResponse( 406, translate("REPORT body contains no XML data!") ); } -$position = 0; -$xmltree = BuildXMLTree( $request->xml_tags, $position); +$xmltree = BuildXMLTree( $request->xml_tags ); if ( !is_object($xmltree) ) { $request->DoResponse( 406, translate("REPORT body is not valid XML data!") ); } diff --git a/scripts/tz-update.php b/scripts/tz-update.php index 87fd310e..7ec23d9b 100755 --- a/scripts/tz-update.php +++ b/scripts/tz-update.php @@ -70,8 +70,7 @@ function fetch_remote_list($base_url ) { xml_get_current_line_number($xml_parser), xml_get_current_column_number($xml_parser) )); } xml_parser_free($xml_parser); - $position = 0; - return BuildXMLTree( $xml_tags, $position); + return BuildXMLTree( $xml_tags ); } function fetch_remote_zone( $base_url, $tzid ) {