Revision 3733,
1014 bytes
checked in by gabriel.malheiros, 14 years ago
(diff) |
Ticket #1541 - <Davical customizado para o Expresso.Utiliza Caldav e CardDav?>
|
Line | |
---|
1 | <?php |
---|
2 | /** |
---|
3 | * DAViCal CalDAV Server - handle principal-search-property-set report (RFC3744) |
---|
4 | * |
---|
5 | * @package davical |
---|
6 | * @subpackage caldav |
---|
7 | * @author Andrew McMillan <andrew@mcmillan.net.nz> |
---|
8 | * @copyright Morphoss Ltd - http://www.morphoss.com/ |
---|
9 | * @license http://gnu.org/copyleft/gpl.html GNU GPL v2 or later |
---|
10 | */ |
---|
11 | |
---|
12 | |
---|
13 | /** |
---|
14 | * Wrap an individual property name as needed |
---|
15 | */ |
---|
16 | function property_response( &$xmldoc, $property ) { |
---|
17 | $prop = new XMLElement( 'prop' ); |
---|
18 | $xmldoc->NSElement($prop, $property ); |
---|
19 | return new XMLElement( 'principal-search-property', $prop ); |
---|
20 | } |
---|
21 | |
---|
22 | $principal_search_property_set = array( |
---|
23 | 'DAV::displayname', |
---|
24 | 'urn:ietf:params:xml:ns:caldav:calendar-home-set', |
---|
25 | 'urn:ietf:params:xml:ns:caldav:calendar-user-address-set' |
---|
26 | ); |
---|
27 | |
---|
28 | $responses = array(); |
---|
29 | foreach( $principal_search_property_set AS $k => $tag ) { |
---|
30 | $responses[] = property_response( $reply, $tag ); |
---|
31 | } |
---|
32 | |
---|
33 | |
---|
34 | $report = new XMLElement( 'principal-search-property-set', $responses, $reply->GetXmlNsArray() ); |
---|
35 | |
---|
36 | $request->XMLResponse( 207, $report ); |
---|
Note: See
TracBrowser
for help on using the repository browser.