From 4112758902ed4c364a2819e932a029cd4256b5f7 Mon Sep 17 00:00:00 2001 From: Yung Han Khoe Date: Wed, 25 Apr 2007 16:20:45 +0000 Subject: [PATCH] Url's in rss feed don't use http_host because http_host includes port and sitenames in conf don't. --- lib/WebGUI/Session/Url.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/WebGUI/Session/Url.pm b/lib/WebGUI/Session/Url.pm index c99896c97..a9a23920d 100644 --- a/lib/WebGUI/Session/Url.pm +++ b/lib/WebGUI/Session/Url.pm @@ -238,11 +238,12 @@ sub getSiteURL { unless ($self->{_siteUrl}) { my $site = ""; my $sitenames = $self->session->config->get("sitename"); - if ($self->session->setting->get("hostToUse") eq "HTTP_HOST" and isIn($self->session->env->get("HTTP_HOST"),@{$sitenames})) { - $site = $self->session->env->get("HTTP_HOST"); - } else { - $site = $sitenames->[0]; - } + my ($http_host,$currentPort) = split(':', $self->session->env->get("HTTP_HOST")); + if ($self->session->setting->get("hostToUse") eq "HTTP_HOST" and isIn($http_host,@{$sitenames})) { + $site = $http_host; + } else { + $site = $sitenames->[0]; + } my $proto = "http://"; if ($self->session->env->get("HTTPS") eq "on") { $proto = "https://";