summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2001-08-02 04:16:32 +0000
committerbwarsaw2001-08-02 04:16:32 +0000
commitcfb9a663103bcc1bbffe43c53c864f3f337d6334 (patch)
tree3a7e9971e5368074b62b128437cee974999359dc
parentb8711326d02b33068bff26765abd97778a80e420 (diff)
downloadmailman-cfb9a663103bcc1bbffe43c53c864f3f337d6334.tar.gz
mailman-cfb9a663103bcc1bbffe43c53c864f3f337d6334.tar.zst
mailman-cfb9a663103bcc1bbffe43c53c864f3f337d6334.zip
process_form(): Since this no longer gets called from the "edit
options" button on the listinfo page, it doesn't need to deal with the UserOptions form key, nor does it need to do the hackishly disgusting call_script() trick to get options.py invoked. call_script(): Removed.
-rw-r--r--Mailman/Cgi/subscribe.py41
1 files changed, 0 insertions, 41 deletions
diff --git a/Mailman/Cgi/subscribe.py b/Mailman/Cgi/subscribe.py
index 056d2ae5a..89a2fb203 100644
--- a/Mailman/Cgi/subscribe.py
+++ b/Mailman/Cgi/subscribe.py
@@ -94,51 +94,10 @@ def main():
-def call_script(mlist, member, which):
- """A hack to call one of the other CGI scripts."""
- os.environ['PATH_INFO'] = SLASH.join([mlist.internal_name(), member])
- pkg = __import__('Mailman.Cgi', globals(), locals(), [which])
- mod = getattr(pkg, which)
- mlist.Save()
- mlist.Unlock()
- mod.main()
- sys.stdout.flush()
- sys.stderr.flush()
- # skip finally clause above since we've already saved and unlocked the list
- os._exit(0)
-
-
-
def process_form(mlist, doc, cgidata, lang):
error = 0
results = ''
- if cgidata.has_key('UserOptions') or \
- cgidata.has_key('info') and \
- not cgidata.has_key("email"):
- # Then go to user options section.
- if not cgidata.has_key('info'):
- doc.AddItem(Header(2, _("Error")))
- doc.AddItem(Bold(_("You must supply your email address.")))
- doc.AddItem(mlist.GetMailmanFooter())
- print doc.Format()
- return
-
- addr = cgidata['info'].value
- member = addr.lower()
- if not mlist.isMember(member):
- realname = mlist.real_name
- doc.AddItem(Header(2, _("Error")))
- doc.AddItem(Bold(
- _("%(realname)s has no subscribed addr <i>%(addr)s</i>.")))
- doc.AddItem(mlist.GetMailmanFooter())
- print doc.Format()
- return
-
- call_script(mlist, member, 'options')
- # should never get here!
- assert 0
-
if not cgidata.has_key('email'):
error = 1
results += _("You must supply a valid email address.<br>")