------------------------------------------------------------
revno: 1154
committer: Mark Sapiro <[email protected]>
branch nick: 2.1
timestamp: Fri 2009-01-02 18:40:28 -0800
message:
  Mailman/Utils.py
    - Fixed a long standing error that stopped relative hrefs from being
      generated for links on Mailman's web pages.
  
  Mailman/Cgi/admindb.py
    - Changed the admindb interface so that when messages are rejected from
      the summary page, the reject reason is the rejection message from the
      Errors.HoldMessage subclass instead of the generic "No reason given".
modified:
  Mailman/Cgi/admindb.py
  Mailman/Utils.py
  NEWS

=== modified file 'Mailman/Cgi/admindb.py'
--- a/Mailman/Cgi/admindb.py    2007-06-12 21:53:14 +0000
+++ b/Mailman/Cgi/admindb.py    2009-01-03 02:40:28 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2007 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2009 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
@@ -554,12 +554,8 @@
 
 
 def show_post_requests(mlist, id, info, total, count, form):
-    # For backwards compatibility with pre 2.0beta3
-    if len(info) == 5:
-        ptime, sender, subject, reason, filename = info
-        msgdata = {}
-    else:
-        ptime, sender, subject, reason, filename, msgdata = info
+    # Mailman.ListAdmin.__handlepost no longer tests for pre 2.0beta3
+    ptime, sender, subject, reason, filename, msgdata = info
     form.AddItem('<hr>')
     # Header shown on each held posting (including count of total)
     msg = _('Posting Held for Approval')
@@ -709,10 +705,12 @@
             preserve = actions.get('senderpreserve', 0)
             forward = actions.get('senderforward', 0)
             forwardaddr = actions.get('senderforwardto', '')
-            comment = _('No reason given')
             bysender = helds_by_sender(mlist)
             for id in bysender.get(sender, []):
                 try:
+                    msgdata = mlist.GetRecord(id)[5]
+                    comment = msgdata.get('rejection_notice',
+                                      _('[No explanation given]'))
                     mlist.HandleRequest(id, action, comment, preserve,
                                         forward, forwardaddr)
                 except (KeyError, Errors.LostHeldMessage):
@@ -771,7 +769,8 @@
         forwardaddrkey = 'forward-addr-%d' % request_id
         bankey = 'ban-%d' % request_id
         # Defaults
-        comment = _('[No reason given]')
+        msgdata = mlist.GetRecord(request_id)[5]
+        comment = msgdata.get('rejection_notice', _('[No explanation given]'))
         preserve = 0
         forward = 0
         forwardaddr = ''

=== modified file 'Mailman/Utils.py'
--- a/Mailman/Utils.py  2008-12-05 23:08:41 +0000
+++ b/Mailman/Utils.py  2009-01-03 02:40:28 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2008 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2009 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
@@ -266,7 +266,7 @@
         fullpath = os.environ.get('SCRIPT_NAME', '') + \
                    os.environ.get('PATH_INFO', '')
     baseurl = urlparse.urlparse(web_page_url)[2]
-    if not absolute and fullpath.endswith(baseurl):
+    if not absolute and fullpath.startswith(baseurl):
         # Use relative addressing
         fullpath = fullpath[len(baseurl):]
         i = fullpath.find('?')

=== modified file 'NEWS'
--- a/NEWS      2008-12-29 18:39:10 +0000
+++ b/NEWS      2009-01-03 02:40:28 +0000
@@ -68,6 +68,13 @@
     - Added missing --bare option to French translation of list_lists help.
       Bug #312119.
 
+    - Fixed a long standing error that stopped relative hrefs from being
+      generated for links on Mailman's web pages.
+
+    - Changed the admindb interface so that when messages are rejected from
+      the summary page, the reject reason is the rejection message from the
+      Errors.HoldMessage subclass instead of the generic "No reason given".
+
 2.1.11 (30-Jun-2008)
 
   New Features



--
Stable, maintained release series
https://code.launchpad.net/~mailman-coders/mailman/2.1

You are receiving this branch notification because you are subscribed to it.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to