* @return string url of the archives
*/
function getArchivesUrl() {
- if (forge_get_config('use_ssl')) {
- $proto = 'https';
- } else {
- $proto = 'http';
- }
+ $host = util_url_prefix() . forge_get_config('lists_host');
if ($this->isPublic()) {
- return "$proto://".forge_get_config('lists_host').'/pipermail/'.$this->getName().'/';
+ return $host . '/pipermail/' . $this->getName() . '/';
} else {
- return "$proto://".forge_get_config('lists_host').'/mailman/private/'.$this->getName().'/';
+ return $host . '/mailman/private/' . $this->getName() . '/';
}
}
* @return string url of the info page
*/
function getExternalInfoUrl() {
- if (forge_get_config('use_ssl')) {
- $proto = 'https';
- } else {
- $proto = 'http';
- }
- return "$proto://".forge_get_config('lists_host').'/mailman/listinfo/'.$this->getName();
+ return util_url_prefix() . forge_get_config('lists_host') .
+ '/mailman/listinfo/' . $this->getName();
}
/**
* @return string url of the admin
*/
function getExternalAdminUrl() {
- if (forge_get_config('use_ssl')) {
- $proto = 'https';
- } else {
- $proto = 'http';
- }
- return "$proto://".forge_get_config('lists_host').'/mailman/admin/'.$this->getName();
+ return util_url_prefix() . forge_get_config('lists_host') .
+ '/mailman/admin/' . $this->getName();
}
/**