[CalendarServer-changes] [3647] CalendarServer/trunk/twistedcaldav/resource.py

source_changes at macosforge.org source_changes at macosforge.org
Sat Feb 7 03:44:22 PST 2009


Revision: 3647
          http://trac.macosforge.org/projects/calendarserver/changeset/3647
Author:   darla at apple.com
Date:     2009-02-07 03:44:18 -0800 (Sat, 07 Feb 2009)
Log Message:
-----------
Using the resource full or short name for the display name instead of the GUID

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/resource.py

Modified: CalendarServer/trunk/twistedcaldav/resource.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/resource.py	2009-02-06 18:10:11 UTC (rev 3646)
+++ CalendarServer/trunk/twistedcaldav/resource.py	2009-02-07 11:44:18 UTC (rev 3647)
@@ -428,6 +428,21 @@
         return d
 
     ##
+    # DAVResource
+    ##
+
+    def displayName(self):
+        if 'record' in dir(self):
+            if self.record.fullName:
+                return self.record.fullName
+            elif self.record.shortNames:
+                return self.record.shortNames[0]
+            else:
+                return super(DAVResource, self).displayName()
+        else:
+            return super(DAVResource, self).displayName()
+
+    ##
     # CalDAV
     ##
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090207/d168997a/attachment.html>


More information about the calendarserver-changes mailing list