[CMF-checkins] CVS: Products/CMFDefault - Portal.py:1.44.2.2

Yvo Schubbe y.2004_ at wcm-solutions.de
Sun Oct 17 16:03:46 EDT 2004


Update of /cvs-repository/Products/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv4290/CMFDefault

Modified Files:
      Tag: CMF-1_5-branch
	Portal.py 
Log Message:
- refactored reconfig_form
- added 'default_charset' property (http://collector.zope.org/CMF/261, part 2)


=== Products/CMFDefault/Portal.py 1.44.2.1 => 1.44.2.2 ===
--- Products/CMFDefault/Portal.py:1.44.2.1	Mon Oct  4 03:56:15 2004
+++ Products/CMFDefault/Portal.py	Sun Oct 17 16:03:16 2004
@@ -202,7 +202,7 @@
         addCMFDefaultTool('Default Properties Tool', None)
         addCMFDefaultTool('Default Metadata Tool', None)
         addCMFDefaultTool('Default Syndication Tool', None)
-        
+
         # try to install CMFUid without raising exceptions if not available
         try:
             addCMFUidTool = p.manage_addProduct['CMFUid'].manage_addTool
@@ -212,7 +212,7 @@
             addCMFUidTool('Unique Id Annotation Tool', None)
             addCMFUidTool('Unique Id Generator Tool', None)
             addCMFUidTool('Unique Id Handler Tool', None)
-        
+
     def setupMailHost(self, p):
         p.manage_addProduct['MailHost'].manage_addMailHost(
             'MailHost', smtp_host='localhost')
@@ -350,11 +350,11 @@
 
     def setupDefaultProperties(self, p, title, description,
                                email_from_address, email_from_name,
-                               validate_email,
-                               ):
+                               validate_email, default_charset):
         p._setProperty('email_from_address', email_from_address, 'string')
         p._setProperty('email_from_name', email_from_name, 'string')
         p._setProperty('validate_email', validate_email and 1 or 0, 'boolean')
+        p._setProperty('default_charset', '', 'string')
         p._setProperty('enable_permalink', 0, 'boolean')
         p.title = title
         p.description = description
@@ -367,15 +367,15 @@
                          create_userfolder=1,
                          email_from_address='postmaster at localhost',
                          email_from_name='Portal Administrator',
-                         validate_email=0, RESPONSE=None):
-    '''
-    Adds a portal instance.
-    '''
+                         validate_email=0, default_charset='',
+                         RESPONSE=None):
+    """ Adds a portal instance.
+    """
     gen = PortalGenerator()
     id = id.strip()
     p = gen.create(self, id, create_userfolder)
     gen.setupDefaultProperties(p, title, description,
                                email_from_address, email_from_name,
-                               validate_email)
+                               validate_email, default_charset)
     if RESPONSE is not None:
         RESPONSE.redirect(p.absolute_url() + '/finish_portal_construction')



More information about the CMF-checkins mailing list