diff options
author | msapiro <> | 2006-03-18 17:23:04 +0000 |
---|---|---|
committer | msapiro <> | 2006-03-18 17:23:04 +0000 |
commit | d249751089e06abcf9e233f2643451f9bfe1571e (patch) | |
tree | 9da14159aee2a3a67e944181d69a46ebac724a1e | |
parent | 34eb1a98065125a35fe4e7d37a16404ffa8a4467 (diff) | |
download | mailman2-d249751089e06abcf9e233f2643451f9bfe1571e.tar.gz mailman2-d249751089e06abcf9e233f2643451f9bfe1571e.tar.xz mailman2-d249751089e06abcf9e233f2643451f9bfe1571e.zip |
Improved fix for bug 1275856 to return host part of DEFAULT_URL if any from
get_domain() if VIRTUAL_HOST_OVERVIEW off.
-rw-r--r-- | Mailman/Utils.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py index 872eb072..d0eca99a 100644 --- a/Mailman/Utils.py +++ b/Mailman/Utils.py @@ -680,13 +680,11 @@ def get_domain(): if mm_cfg.VIRTUAL_HOST_OVERVIEW and host: return host.lower() else: - # See the note in Defaults.py concerning DEFAULT_HOST_NAME - # vs. DEFAULT_EMAIL_HOST. - # MAS: This is inconsistent - DEFAULT_URL_HOST is correct. - # DEFAULT_HOST_NAME should really be the host portion of - # DEFAULT_URL, but that's not a setting, and these have been - # deprecated since Aug., 2001, so leave it. - hostname = mm_cfg.DEFAULT_HOST_NAME or mm_cfg.DEFAULT_URL_HOST + # See the note in Defaults.py concerning DEFAULT_URL + # vs. DEFAULT_URL_HOST. + hostname = ((mm_cfg.DEFAULT_URL + and urlparse.urlparse(mm_cfg.DEFAULT_URL)[1]) + or mm_cfg.DEFAULT_URL_HOST) return hostname.lower() |