[Zope-Checkins] CVS: Zope/lib/python/Products/MailHost - MailHost.py:1.67

Jens Vagelpohl jens@zope.com
Mon, 14 Jan 2002 23:31:24 -0500


Update of /cvs-repository/Zope/lib/python/Products/MailHost
In directory cvs.zope.org:/tmp/cvs-serv15648

Modified Files:
	MailHost.py 
Log Message:
Get rid of MessageDialog



=== Zope/lib/python/Products/MailHost/MailHost.py 1.66 => 1.67 ===
 __version__ = "$Revision$"[11:-2]
 
-from Globals import Persistent, DTMLFile, MessageDialog, InitializeClass
+from Globals import Persistent, DTMLFile, InitializeClass
 from smtplib import SMTP
 from AccessControl.Role import RoleManager
 from operator import truth
@@ -87,11 +87,12 @@
         self.title=title
         self.smtp_host=smtp_host
         self.smtp_port=smtp_port
-        if REQUEST: return MessageDialog(
-            title  ='Changed %s' % self.__name__,
-            message='%s has been updated' % self.id,
-            action =REQUEST['URL2']+'/manage_main',
-            target ='manage_main')
+        if REQUEST is not None:
+            msg = 'MailHost %s updated' % self.id
+            return self.manage_main( self
+                                   , REQUEST
+                                   , manage_tabs_message=msg
+                                   )
     
     security.declareProtected( use_mailhost_services, 'sendTemplate' )
     def sendTemplate(trueself, self, messageTemplate,