Title: [commits] (grant) [11363] Re-fix Bug:4941, since I introduced a regression before
Revision
11363
Author
grant
Date
2006-08-09 13:40:18 -0700 (Wed, 09 Aug 2006)

Log Message

Re-fix Bug:4941, since I introduced a regression before

- Only try to set the new collection's displayName from DAV:displayname
in the case of a new CalDAV collection.

Modified Paths

Diff

Modified: trunk/chandler/parcels/osaf/sharing/Sharing.py (11362 => 11363)

--- trunk/chandler/parcels/osaf/sharing/Sharing.py	2006-08-09 20:25:21 UTC (rev 11362)
+++ trunk/chandler/parcels/osaf/sharing/Sharing.py	2006-08-09 20:40:18 UTC (rev 11363)
@@ -1016,9 +1016,7 @@
             # When first importing a collection, name it after the share
             if not getattr(cvSelf.share.contents, 'displayName', ''):
                 cvSelf.share.contents.displayName = \
-                    cvSelf.share.displayName
-                    # @@@MOR commenting out until I talk to Grant:
-                    # self._getDisplayNameForShare(cvSelf.share)
+                    self._getDisplayNameForShare(cvSelf.share)
 
             # If an item was previously on the server (it was in our
             # manifest) but is no longer on the server, remove it from
@@ -1671,20 +1669,6 @@
             resource.ticketId = self.ticket
         return resource
 
-    def _getDisplayNameForShare(self, share):
-        container = self._getContainerResource()
-        try:
-            result = container.serverHandle.blockUntil(container.getDisplayName)
-        except:
-            result = ""
-            
-        return result or super(WebDAVConduit,
-                               self)._getDisplayNameForShare(share)
-            
-        return result
-
-
-
     def _putItem(self, item):
         """
         putItem should publish an item and return etag/date, etc.
@@ -1957,6 +1941,16 @@
     def _createCollectionResource(self, handle, resource, childName):
         return handle.blockUntil(resource.createCalendar, childName)
 
+    def _getDisplayNameForShare(self, share):
+        container = self._getContainerResource()
+        try:
+            result = container.serverHandle.blockUntil(container.getDisplayName)
+        except:
+            result = ""
+            
+        return result or super(WebDAVConduit,
+                               self)._getDisplayNameForShare(share)
+
     def _putItem(self, item):
         result = super(CalDAVConduit, self)._putItem(item)
 




_______________________________________________
Commits mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/commits

Reply via email to