diff options
| author | bwarsaw | 2001-05-09 14:58:57 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-05-09 14:58:57 +0000 |
| commit | eb01baa05f17a77ef7f3b794f58befe42d81f612 (patch) | |
| tree | 5840ebef17af1592b9b776a056ba362fa8a7976f | |
| parent | 0afc181bd1cc79be7e79db32df19d86beb9c0389 (diff) | |
| download | mailman-eb01baa05f17a77ef7f3b794f58befe42d81f612.tar.gz mailman-eb01baa05f17a77ef7f3b794f58befe42d81f612.tar.zst mailman-eb01baa05f17a77ef7f3b794f58befe42d81f612.zip | |
listinfo_overview(): The hostname/domain grokking code was moved into
Utils.get_domain().
| -rw-r--r-- | Mailman/Cgi/listinfo.py | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/Mailman/Cgi/listinfo.py b/Mailman/Cgi/listinfo.py index 1a65fa15e..a43324073 100644 --- a/Mailman/Cgi/listinfo.py +++ b/Mailman/Cgi/listinfo.py @@ -66,19 +66,7 @@ def main(): def listinfo_overview(msg=''): # Present the general listinfo overview - # - # TBD: We need a portable way to determine the host by which we are being - # visited! An absolute URL would do... - http_host = os.environ.get('HTTP_HOST', os.environ.get('SERVER_NAME')) - port = os.environ.get('SERVER_PORT') - # Strip off the port if there is one - if port and http_host[-len(port)-1:] == ':'+port: - http_host = http_host[:-len(port)-1] - if mm_cfg.VIRTUAL_HOST_OVERVIEW and http_host: - hostname = http_host - else: - hostname = mm_cfg.DEFAULT_HOST_NAME - + hostname = Utils.get_domain() # Set up the document and assign it the correct language. The only one we # know about at the moment is the server's default. doc = Document() @@ -101,9 +89,9 @@ def listinfo_overview(msg=''): mlist = MailList.MailList(name, lock=0) if mlist.advertised: if mm_cfg.VIRTUAL_HOST_OVERVIEW and \ - http_host and \ - http_host.find(mlist.web_page_url) == -1 and \ - mlist.web_page_url.find(http_host) == -1: + hostname and \ + hostname.find(mlist.web_page_url) == -1 and \ + mlist.web_page_url.find(hostname) == -1: # List is for different identity of this host - skip it. continue else: |
