[CalendarServer-changes] [3017] CalendarServer/branches/users/sagen/principal-property-search-2995/ twistedcaldav/directory/principal.py
source_changes at macosforge.org
source_changes at macosforge.org
Thu Sep 18 15:31:50 PDT 2008
Revision: 3017
http://trac.macosforge.org/projects/calendarserver/changeset/3017
Author: sagen at apple.com
Date: 2008-09-18 15:31:50 -0700 (Thu, 18 Sep 2008)
Log Message:
-----------
Use property.qname( ) rather than repr( ) to look up DAV properties
Modified Paths:
--------------
CalendarServer/branches/users/sagen/principal-property-search-2995/twistedcaldav/directory/principal.py
Modified: CalendarServer/branches/users/sagen/principal-property-search-2995/twistedcaldav/directory/principal.py
===================================================================
--- CalendarServer/branches/users/sagen/principal-property-search-2995/twistedcaldav/directory/principal.py 2008-09-18 20:49:25 UTC (rev 3016)
+++ CalendarServer/branches/users/sagen/principal-property-search-2995/twistedcaldav/directory/principal.py 2008-09-18 22:31:50 UTC (rev 3017)
@@ -131,10 +131,10 @@
_cs_ns = "http://calendarserver.org/ns/"
_fieldMap = {
- "<{DAV:}%s>" % ("displayname",) : "fullName",
- "<{%s}%s>" % (_cs_ns, "first-name") : "firstName",
- "<{%s}%s>" % (_cs_ns, "last-name") : "lastName",
- "<{%s}%s>" % (_cs_ns, "email-address") : "emailAddress",
+ ("DAV:" , "displayname") : "fullName",
+ (_cs_ns, "first-name") : "firstName",
+ (_cs_ns, "last-name") : "lastName",
+ (_cs_ns, "email-address") : "emailAddress",
}
def propertyToField(self, property):
@@ -142,7 +142,7 @@
If property is a DAV property that maps to a directory field, return
that field's name, otherwise return None
"""
- return self._fieldMap.get(repr(property), None)
+ return self._fieldMap.get(property.qname(), None)
class DirectoryPrincipalProvisioningResource (DirectoryProvisioningResource):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080918/a33f1f0d/attachment.html
More information about the calendarserver-changes
mailing list