From ef77bc3d39d3c9a6bca965bc72d9599c60fa239e Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sat, 6 Mar 2010 23:26:58 +1300 Subject: [PATCH] Fix namespacing. --- inc/caldav-MKTICKET.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/caldav-MKTICKET.php b/inc/caldav-MKTICKET.php index 1f99d710..b25dd421 100644 --- a/inc/caldav-MKTICKET.php +++ b/inc/caldav-MKTICKET.php @@ -23,7 +23,7 @@ require_once('DAVResource.php'); $request->NeedPrivilege('DAV::bind'); require_once('XMLDocument.php'); -$reply = new XMLDocument(array( 'DAV:' => '', 'T' => 'http://www.xythos.com/namespaces/StorageServer' )); +$reply = new XMLDocument(array( 'DAV:' => '', 'http://www.xythos.com/namespaces/StorageServer' => 'T' )); $target = new DAVResource( $request->path ); if ( ! $target->Exists() ) { @@ -93,15 +93,15 @@ do { $result = $qry->Exec('MKTICKET', __LINE__, __FILE__); } while( !$result && $i++ < 2 ); -$privs = array(); +$privs = new XMLElement('privilege'); foreach( bits_to_privilege($ticket_privileges) AS $k => $v ) { - $privs[] = new XMLElement($v); + $reply->NSElement($privs, $v); } $ticketinfo = new XMLElement( 'T:ticketinfo', array( new XMLElement( 'T:id', $ticket_id), new XMLElement( 'owner', $reply->href( ConstructURL('/'.$session->username.'/') ) ), - new XMLElement( 'privilege', $privs), + $privs, new XMLElement( 'T:timeout', $ticket_timeout), new XMLElement( 'T:visits', 'infinity') )