Skip to content

/ Zope / gocept svn checkins / Archive / 2004 / 2004-12 / CVS: ATCountryWidget - CountryTool.py:1.3

[ << ] [ >> ]

[ CVS: glome/skins/glome_scripts - ... ] [ CVS: Formulon - ErrorTranslator.py:1.31 / Michael ... ]

CVS: ATCountryWidget - CountryTool.py:1.3
Daniel Havlik <dh(at)gocept.com>
2004-12-16 08:54:35 [ FULL ]
Update of /cvs/gocept/ATCountryWidget
In directory amy:/tmp/cvs-serv3711

Modified Files:
	CountryTool.py 
Log Message:
added method to return the area a country is in


=== ATCountryWidget/CountryTool.py 1.2 => 1.3 ===
--- ATCountryWidget/CountryTool.py:1.2	Tue Jun 29 11:54:14 2004
+++ ATCountryWidget/CountryTool.py	Thu Dec 16 08:49:09 2004
(at)(at) -146,7 +146,15 (at)(at)
         if filter is None:
             return tuple(self._area_list)
         return self._filtered_arealist(filter)
-    
+   
+    security.declareProtected(access_contents_information,
+                             'getArea')
+    def getArea(self, countrycode):
+        """returns area name of country code"""
+        for area in self.listAreas():
+            if countrycode in [c.isocc for c in area.countries]:
+                return area.name
+        return None
                                         
 #     def tuple2display(self,tuplelist):
 #         displayl=DisplayList()

CVS: PloneIM - imtool.py:1.12
Daniel Havlik <dh(at)gocept.com>
2004-12-22 12:35:56 [ FULL ]
Update of /cvs/gocept/PloneIM
In directory amy:/tmp/cvs-serv24152

Modified Files:
	imtool.py 
Log Message:
tuned timeouts
added lock when server is not responding to javascript


=== PloneIM/imtool.py 1.11 => 1.12 ===
--- PloneIM/imtool.py:1.11	Fri Aug 27 10:39:05 2004
+++ PloneIM/imtool.py	Wed Dec 22 12:36:09 2004
(at)(at) -156,7 +156,7 (at)(at)
         """see interface"""
         pm = getToolByName(self, 'portal_membership')
         pa = getToolByName(self, 'portal_activeusers')
-        onlineUsers = [ uad['username'] for uad in
pa.listUserActivities(timeout=5) ]
+        onlineUsers = [ uad['username'] for uad in
pa.listUserActivities(timeout=15) ]
 
         allUsers = pm.listMemberIds()
 
(at)(at) -237,19 +237,20 (at)(at)
         #fetch uid
         id = str(self.getNewUniqueId())
         newMessage = PlimMessage(id)
+        container._setObject(id, newMessage)
+        newMessage = getattr(container, id)
+        if newMessage is None:
+            raise ValueError, 'Message creation failed'
+             
         newMessage.setSender(sender)
         newMessage.setRecipient(recipient)
         newMessage.setSubject(subject)
         newMessage.setMessage(text)
-        container._setObject(id, newMessage)
-        message = getattr(container, id, None)
-        if message is None:
-            raise ValueError, 'Message creation failed'
         
         #message should not be in the catalog
-        catalog.unindexObject(message)
+        catalog.unindexObject(newMessage)
 
-        return message
+        return newMessage
 
 
     security.declarePrivate('_getMessagesFolder')

MailBoxer