From: eldy <> Date: Sat, 23 Aug 2003 10:01:33 +0000 (+0000) Subject: Fix wrong name of generated pages for unknownos and unknownbrowser page. X-Git-Tag: AWSTATS_WEBMIN_1_0_RELEASE~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77c8e01e6959cde7dd2c73238ad5eec766d94ff7;p=thirdparty%2FAWStats.git Fix wrong name of generated pages for unknownos and unknownbrowser page. --- diff --git a/docs/awstats_config.html b/docs/awstats_config.html index 48db2ee4..d73d93cf 100644 --- a/docs/awstats_config.html +++ b/docs/awstats_config.html @@ -677,7 +677,7 @@ when reading it), follow the example:

# Note: Use space between each value.
# Note: You can use regular expression values writing value with REGEX[value].
# Change : Effective for new updates only -
# Example: "127.0.0.1 REGEX[^192\.168\.] REGEX[^10\.0\.]" +
# Example: "127.0.0.1 REGEX[^192\.168\.] REGEX[^10\.0\.0\.]"
# Example: "localhost REGEX[^.*\.localdomain$]"
# Default: ""
# @@ -731,7 +731,7 @@ when reading it), follow the example:

# Note: Use space between each value. This parameter is not case sensitive.
# Note: You can use regular expression values writing value with REGEX[value].
# Change : Effective for new updates only -
# Example: "127.0.0.1 REGEX[^192\.168\.] REGEX[^10\.0\.]" +
# Example: "127.0.0.1 REGEX[^192\.168\.] REGEX[^10\.0\.0\.]"
# Default: ""
#
OnlyHosts="" diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index 138664d5..ce37aaa6 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -1702,7 +1702,7 @@ sub Read_Plugins { # Do not load "output plugins" if update only if ($UpdateStats && ! scalar keys %HTMLOutput && $pluginisfor{$pluginname} !~ /u/) { $PluginsLoaded{'init'}{"$pluginname"}=1; next; } } - else { $PluginsLoaded{'init'}{"$pluginname"}=1; } # Unkown plugins always loaded + else { $PluginsLoaded{'init'}{"$pluginname"}=1; } # Unknown plugins always loaded # Load plugin foreach my $dir (@PossiblePluginsDir) { my $searchdir=$dir; @@ -1955,7 +1955,7 @@ sub Read_History_With_TmpUpdate { } # If migrate and version < 4.x we need to include BEGIN_UNKNOWNIP into BEGIN_VISITOR for backward compatibility if ($MigrateStats && $versionnum < 4000) { - debug("File is version < 4000. We add UNKOWNIP in sections to load",1); + debug("File is version < 4000. We add UNKNOWNIP in sections to load",1); $SectionsToLoad{'unknownip'}=99; } @@ -2225,7 +2225,7 @@ sub Read_History_With_TmpUpdate { if (! scalar %SectionsToLoad) { debug(" Stop reading history file. Got all we need."); last; } next; } - # BEGIN_UNKOWNIP for backward compatibility + # BEGIN_UNKNOWNIP for backward compatibility if ($field[0] eq 'BEGIN_UNKNOWNIP') { if ($Debug) { debug(" Begin of UNKNOWNIP section"); } $_=; @@ -4349,17 +4349,28 @@ sub ShowURLInfo { if (length($nompage)>$MaxLengthOfURL) { $nompage=substr($nompage,0,$MaxLengthOfURL)."..."; } if ($ShowLinksOnUrl) { my $newkey=CleanFromCSSA($url); - if ($newkey =~ /^http(s|):/i) { # URL seems to be extracted from a ftp or proxy log file - print "$nompage"; + if ($LogType eq 'W') { # Web log file + if ($newkey =~ /^http(s|):/i) { # URL seems to be extracted from a proxy log file + print "$nompage"; + } + elsif ($newkey =~ /^\//) { # URL seems to be an url extracted from a web or wap server log file + $newkey =~ s/^\/$SiteDomain//; + # Define urlprot + my $urlprot='http'; + if ($UseHTTPSLinkForUrl && $newkey =~ /^$UseHTTPSLinkForUrl/) { $urlprot='https'; } + print "$nompage"; + } + else { + print "$nompage"; + } } - elsif ($newkey =~ /^\//) { # URL seems to be an url extracted from a web or wap server log file - $newkey =~ s/^\/$SiteDomain//; - # Define http or https - my $httplink='http'; - if ($UseHTTPSLinkForUrl && $newkey =~ /^$UseHTTPSLinkForUrl/) { $httplink='https'; } - print "$nompage"; + elsif ($LogType eq 'F') { # Ftp log file + print "$nompage"; } - else { + elsif ($LogType eq 'M') { # Smtp log file + print "$nompage"; + } + else { # Other type log file print "$nompage"; } } @@ -5274,11 +5285,11 @@ if ($UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft') { # Updat # Mail request ('SMTP' for mail log with maillogconvert.pl preprocessor) $protocol=3; } - elsif ($field[$pos_method] eq 'RETR' || $field[$pos_method] =~ /get/i) { + elsif ($field[$pos_method] eq 'RETR' || $field[$pos_method] eq 'o' || $field[$pos_method] =~ /get/i) { # FTP GET request $protocol=2; } - elsif ($field[$pos_method] eq 'STOR' || $field[$pos_method] =~ /sent/i) { + elsif ($field[$pos_method] eq 'STOR' || $field[$pos_method] eq 'i' || $field[$pos_method] =~ /sent/i) { # FTP SENT request $protocol=2; } @@ -6975,7 +6986,7 @@ if (scalar keys %HTMLOutput) { &html_end; } if ($HTMLOutput{'unknownip'}) { - print "$Center 
\n"; + print "$Center 
\n"; &tab_head("$Message[45]",19); print "".(scalar keys %_host_h)." $Message[1]"; &ShowHostInfo('__title__'); @@ -7308,7 +7319,7 @@ if (scalar keys %HTMLOutput) { &html_end; } if ($HTMLOutput{'unknownos'}) { - print "$Center 
\n"; + print "$Center 
\n"; my $title="$Message[46]"; &tab_head("$title",19); print "User agent (".(scalar keys %_unknownreferer_l).")$Message[9]\n"; @@ -7333,7 +7344,7 @@ if (scalar keys %HTMLOutput) { &html_end; } if ($HTMLOutput{'unknownbrowser'}) { - print "$Center 
\n"; + print "$Center 
\n"; my $title="$Message[50]"; &tab_head("$title",19); print "User agent (".(scalar keys %_unknownrefererbrowser_l).")$Message[9]\n"; @@ -8938,7 +8949,7 @@ if (scalar keys %HTMLOutput) { if ($ShowOriginStats =~ /P/i) { print "".($_from_p[4]?$_from_p[4]:" ")."".($_from_p[4]?"$p_p[4] %":" ").""; } if ($ShowOriginStats =~ /H/i) { print "".($_from_h[4]?$_from_h[4]:" ")."".($_from_h[4]?"$p_h[4] %":" ").""; } print "\n"; - #------- Unkown origin + #------- Unknown origin print "$Message[39]"; if ($ShowOriginStats =~ /P/i) { print "".($_from_p[1]?$_from_p[1]:" ")."".($_from_p[1]?"$p_p[1] %":" ").""; } if ($ShowOriginStats =~ /H/i) { print "".($_from_h[1]?$_from_h[1]:" ")."".($_from_h[1]?"$p_h[1] %":" ").""; }