~jimmy-sigint/mailman/atomia_package_branch

« back to all changes in this revision

Viewing changes to src/mailman/runners/nntp.py

  • Committer: Barry Warsaw
  • Date: 2012-07-26 04:22:19 UTC
  • mfrom: (7149.2.19 bug-971013)
  • Revision ID: barry@list.org-20120726042219-o4asb3r7f6hil65t
 * The policy for archiving has now been collapsed into a single enum, called
   ArchivePolicy.  This describes the three states of never archive, archive
   privately, and archive_publicly. (LP: #967238)

Database
--------
 * Schema migrations (LP: #971013)
   - include_list_post_header -> allow_list_posts
   - news_prefix_subject_too  -> nntp_prefix_subject_too
   - news_moderation          -> newsgroup_moderation
   - archive and archive_private have been collapsed into archive_policy.
   - nntp_host has been removed.
 * The PostgreSQL port of the schema accidentally added a moderation_callback
   column to the mailinglist table.  Since this is unused in Mailman, it was
   simply commented out of the base schema for PostgreSQL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
from mailman.config import config
37
37
from mailman.core.runner import Runner
38
 
from mailman.interfaces.nntp import NewsModeration
 
38
from mailman.interfaces.nntp import NewsgroupModeration
39
39
 
40
40
COMMA = ','
41
41
COMMASPACE = ', '
106
106
    # software to accept the posting, and not forward it on to the n.g.'s
107
107
    # moderation address.  The posting would not have gotten here if it hadn't
108
108
    # already been approved.  1 == open list, mod n.g., 2 == moderated
109
 
    if mlist.news_moderation in (NewsModeration.open_moderated,
110
 
                                 NewsModeration.moderated):
 
109
    if mlist.newsgroup_moderation in (NewsgroupModeration.open_moderated,
 
110
                                      NewsgroupModeration.moderated):
111
111
        del msg['approved']
112
112
        msg['Approved'] = mlist.posting_address
113
113
    # Should we restore the original, non-prefixed subject for gatewayed
116
116
    # came from mailing list user.
117
117
    stripped_subject = msgdata.get('stripped_subject',
118
118
                                   msgdata.get('original_subject'))
119
 
    # XXX 2012-03-31 BAW: rename news_prefix_subject_too to nntp_.  This
120
 
    # requires a schema change.
121
 
    if not mlist.news_prefix_subject_too and stripped_subject is not None:
 
119
    if not mlist.nntp_prefix_subject_too and stripped_subject is not None:
122
120
        del msg['subject']
123
121
        msg['subject'] = stripped_subject
124
122
    # Add the appropriate Newsgroups header.  Multiple Newsgroups headers are