a couple of bug fixes

This commit is contained in:
JT Smith 2005-12-02 23:00:18 +00:00
parent e1a3cd0adb
commit f7dc0a8604
2 changed files with 4 additions and 11 deletions

View file

@ -786,7 +786,7 @@ sub updateConfigFile {
push(@{$newConfig{assets}}, "WebGUI::Asset::Wobject::StockData") unless isIn("WebGUI::Asset::Wobject::StockData",@{$newConfig{assets}});
push(@{$newConfig{assets}}, "WebGUI::Asset::Wobject::WeatherData") unless isIn("WebGUI::Asset::Wobject::WeatherData",@{$newConfig{assets}});
push(@{$newConfig{assets}}, "WebGUI::Asset::Wobject::MultiSearch") unless isIn("WebGUI::Asset::Wobject::MultiSearch",@{$newConfig{assets}});
$newConfig{macros}{RandomThread}{RandomThread};
$newConfig{macros}{RandomThread} = "RandomThread";
$newConfig{gateway} = "/";
$conf->purge;
$conf->set(%newConfig);

View file

@ -122,10 +122,8 @@ Name value pairs to add to the URL in the form of:
sub gateway {
my $pageUrl = shift;
my $pairs = shift;
$pageUrl =~ s/^\///;
my $url = $session{config}{gateway};
$url .= '/' unless ($url =~ m/\/$/);
$url .= $pageUrl;
my $url = $session{config}{gateway}.'/'.$pageUrl;
$url =~ s/\/+/\//g;
if ($session{setting}{preventProxyCache} == 1) {
$url = append($url,"noCache=".randint(0,1000).';'.time());
}
@ -246,12 +244,7 @@ sub page {
if ($useFullUrl) {
$url = getSiteURL();
}
$url .= gateway();
if ($session{asset}) {
$url .= $session{asset}->get("url");
} else {
$url .= $session{requestedUrl};
}
$url .= gateway($session{asset} ? $session{asset}->get("url") : $session{requestedUrl});
if ($session{setting}{preventProxyCache} == 1 && !$skipPreventProxyCache) {
$url = append($url,"noCache=".randint(0,1000).';'.time());
}