------------------------------------------------------------
revno: 1097
committer: Mark Sapiro <[email protected]>
branch nick: 2.2
timestamp: Sat 2010-02-27 10:48:20 -0800
message:
  Added a urlhost argument to the MailList.MailList.Create() method to
  allow bin/newlist and the the create CGI to pass urlhost so the host
  will be correct in the listinfo link on the emptyarchive page.
  Bug #529100.
modified:
  Mailman/Cgi/create.py
  Mailman/MailList.py
  NEWS
  bin/newlist


--
lp:mailman/2.2
https://code.launchpad.net/~mailman-coders/mailman/2.2

Your team Mailman Checkins is subscribed to branch lp:mailman/2.2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.2/+edit-subscription.
=== modified file 'Mailman/Cgi/create.py'
--- Mailman/Cgi/create.py	2008-11-13 04:02:29 +0000
+++ Mailman/Cgi/create.py	2010-02-27 18:48:20 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2008 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-2010 by the Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -187,7 +187,8 @@
         oldmask = os.umask(002)
         try:
             try:
-                mlist.Create(listname, owner, pw, langs, emailhost)
+                mlist.Create(listname, owner, pw, langs, emailhost,
+                             urlhost=hostname)
             finally:
                 os.umask(oldmask)
         except Errors.EmailAddressError, e:

=== modified file 'Mailman/MailList.py'
--- Mailman/MailList.py	2009-09-13 01:04:14 +0000
+++ Mailman/MailList.py	2010-02-27 18:48:20 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2008 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2010 by the Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -291,7 +291,8 @@
                 continue
             self._gui.append(getattr(Gui, component)())
 
-    def InitVars(self, name=None, admin='', crypted_password=''):
+    def InitVars(self, name=None, admin='', crypted_password='',
+                 urlhost=None):
         """Assign default values - some will be overriden by stored state."""
         # Non-configurable list info
         if name:
@@ -323,7 +324,7 @@
         self.host_name = mm_cfg.DEFAULT_HOST_NAME or mm_cfg.DEFAULT_EMAIL_HOST
         self.web_page_url = (
             mm_cfg.DEFAULT_URL or
-            mm_cfg.DEFAULT_URL_PATTERN % mm_cfg.DEFAULT_URL_HOST)
+            mm_cfg.DEFAULT_URL_PATTERN % (urlhost or mm_cfg.DEFAULT_URL_HOST))
         self.owner = [admin]
         self.moderator = []
         self.reply_goes_to_list = mm_cfg.DEFAULT_REPLY_GOES_TO_LIST
@@ -474,7 +475,7 @@
     # List creation
     #
     def Create(self, name, admin, crypted_password,
-               langs=None, emailhost=None):
+               langs=None, emailhost=None, urlhost=None):
         assert name == name.lower(), 'List name must be all lower case.'
         if Utils.list_exists(name):
             raise Errors.MMListAlreadyExistsError, name
@@ -502,7 +503,7 @@
         self._full_path = Site.get_listpath(name, create=1)
         # Don't use Lock() since that tries to load the non-existant config.pck
         self.__lock.lock()
-        self.InitVars(name, admin, crypted_password)
+        self.InitVars(name, admin, crypted_password, urlhost=urlhost)
         self.CheckValues()
         if langs is None:
             self.available_languages = [self.preferred_language]

=== modified file 'NEWS'
--- NEWS	2010-02-23 01:23:52 +0000
+++ NEWS	2010-02-27 18:48:20 +0000
@@ -83,6 +83,11 @@
 
   Bug Fixes and other patches
 
+    - Added a urlhost argument to the MailList.MailList.Create() method to
+      allow bin/newlist and the the create CGI to pass urlhost so the host
+      will be correct in the listinfo link on the emptyarchive page.
+      Bug #529100.
+
     - Added the List-Post header to the default list of headers retained in
       messages in the MIME digest.  Bug #526143.
 

=== modified file 'bin/newlist'
--- bin/newlist	2009-08-05 19:23:21 +0000
+++ bin/newlist	2010-02-27 18:48:20 +0000
@@ -1,6 +1,6 @@
 #! @PYTHON@
 #
-# Copyright (C) 1998-2009 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2010 by the Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -209,7 +209,7 @@
                 else:
                     langs = [lang, mm_cfg.DEFAULT_SERVER_LANGUAGE]
                 mlist.Create(listname, owner_mail, pw, langs=langs,
-                             emailhost=host_name)
+                             emailhost=host_name, urlhost=urlhost)
             finally:
                 os.umask(oldmask)
         except Errors.BadListNameError, s:

_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to