From 6c403973a94da3ad5d11de2d72a95eb1f9c15447 Mon Sep 17 00:00:00 2001 From: eldy <> Date: Wed, 4 Sep 2002 15:24:48 +0000 Subject: [PATCH] Fixed bug 592926 --- wwwroot/cgi-bin/awstats.pl | 45 +++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index 071d4df6..c5694468 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -3037,9 +3037,9 @@ sub Show_Flag_Links { my $NewLinkParams=$QueryString; my $NewLinkTarget=""; if ($ENV{"GATEWAY_INTERFACE"}) { - $NewLinkParams =~ s/update[=]*[^ &]*//i; - $NewLinkParams =~ s/staticlinks[=]*[^ &]*//i; - $NewLinkParams =~ s/framename[=]*[^ &]*//i; + $NewLinkParams =~ s/update(=\w*|$|[ &]+)//i; + $NewLinkParams =~ s/staticlinks(=\w*|$|[ &]+)//i; + $NewLinkParams =~ s/framename=[^ &]*//i; $NewLinkParams =~ s/lang=[^ &]*//i; if ($FrameName eq "mainleft") { $NewLinkTarget=" target=\"_parent\""; } $NewLinkParams =~ tr/&/&/s; $NewLinkParams =~ s/^&//; $NewLinkParams =~ s/&$//; @@ -3322,7 +3322,7 @@ sub Lock_Update { #-------------------------------------------------------------------- # MAIN #-------------------------------------------------------------------- - $starttime=time; +$starttime=time; if ($ENV{"GATEWAY_INTERFACE"}) { # Run from a browser my $ExpireDelayInHTTPHeader=0; @@ -3362,7 +3362,7 @@ else { # Run from command line } if ($QueryString =~ /logfile=([^\s&]+)/i ) { $LogFile=&DecodeEncodedString($1); } if ($QueryString =~ /staticlinks/i) { $StaticLinks=".$SiteConfig"; } -if ($QueryString =~ /staticlinks=([^\s&]+)/i) { $StaticLinks=".$1"; } +if ($QueryString =~ /staticlinks=([^\s&]+)/i) { $StaticLinks=".$1"; } # When ran from awstatsbuildstaticpages.pl if ($QueryString =~ /framename=([^\s&]+)/i) { $FrameName=$1; } if ($QueryString =~ /debug=(\d+)/i) { $Debug=$1; } # Define output option @@ -3372,7 +3372,7 @@ if ($QueryString =~ /output/i) { if (! $ENV{"GATEWAY_INTERFACE"} && $QueryString !~ /update/i) { $UpdateStats=0; } # If output only, on command line, no update if ($QueryString =~ /output=([^\s&:]+)/i) { $HTMLOutput=lc($1); } } -$QueryString=~s/&{0,1}output&//i; $QueryString=~s/&{0,1}output$//i; # -output with no = is same than nothing +$QueryString=~s/output(&|$)//i; $QueryString=~s/&$//; # -output with no = is same than nothing # A filter on URL list can be defined with output=urldetail:filter to reduce number of lines read and showed if ($QueryString =~ /output=urldetail:([^\s&]+)/i) { $URLFilter=&DecodeEncodedString($1); } # A filter on URL list can also be defined with urlfilter=filter @@ -3587,7 +3587,8 @@ if ($UpdateStats && (! $AllowToUpdateStatsFromBrowser) && $ENV{"GATEWAY_INTERFAC if ($FrameName eq "index") { # Define the NewLinkParams for main chart my $NewLinkParams=${QueryString}; - $NewLinkParams =~ s/framename[=]*[^\s&]*//i; + $NewLinkParams =~ s/framename=[^ &]*//i; + $NewLinkParams =~ tr/&/&/s; $NewLinkParams =~ s/^&//; $NewLinkParams =~ s/&$//; if ($NewLinkParams) { $NewLinkParams="${NewLinkParams}&"; } # Exit if main frame print "