From: eldy <> Date: Mon, 23 May 2005 12:21:27 +0000 (+0000) Subject: New: Add check URLWITHQUERY to use extra section conditions on full url (with queries... X-Git-Tag: AWSTATS_WEBMIN_1_6_BETA~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99620efc7010fce5735ceddbabac4ef7f888a89a;p=thirdparty%2FAWStats.git New: Add check URLWITHQUERY to use extra section conditions on full url (with queries parameters) --- diff --git a/wwwroot/cgi-bin/awstats.model.conf b/wwwroot/cgi-bin/awstats.model.conf index 58b42dc0..f9a2928c 100644 --- a/wwwroot/cgi-bin/awstats.model.conf +++ b/wwwroot/cgi-bin/awstats.model.conf @@ -1419,7 +1419,7 @@ color_x="C1B2E2" # Background color for number of exit pages (Default = "C1B2 # and a regex to match, after a coma. Use "||" for "OR". # ExtraSectionFirstColumnTitleX is the first column title of the chart. # ExtraSectionFirstColumnValuesX is a string to tell AWStats which field to -# extract value from (URL,QUERY_STRING,REFERER,UA,HOST,extraX) +# extract value from (URL,URLWITHQUERY,QUERY_STRING,REFERER,UA,HOST,extraX) # and how to extract the value (using regex syntax). Each different value # found will appear in first column of report on a different row. Be sure # that list of different possible values will not grow indefinitely. diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index 7d695967..c6fd4514 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -7168,6 +7168,10 @@ if ($UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft') { # Updat if ($Debug) { debug(" Check condition '$conditiontype' must contain '$conditiontypeval' in '$standalonequery'",5); } if ($standalonequery =~ /$conditiontypeval/) { $conditionok=1; last; } } + elsif ($conditiontype eq 'URLWITHQUERY') { + if ($Debug) { debug(" Check condition '$conditiontype' must contain '$conditiontypeval' in '$urlwithnoquery$tokenquery$standalonequery'",5); } + if ("$urlwithnoquery$tokenquery$standalonequery" =~ /$conditiontypeval/) { $conditionok=1; last; } + } elsif ($conditiontype eq 'REFERER') { if ($Debug) { debug(" Check condition '$conditiontype' must contain '$conditiontypeval' in '$field[$pos_referer]'",5); } if ($field[$pos_referer] =~ /$conditiontypeval/) { $conditionok=1; last; } @@ -7202,6 +7206,9 @@ if ($UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft') { # Updat if ($Debug) { debug(" Extract value from '$standalonequery' with regex '$rowkeytypeval'.",5); } if ($standalonequery =~ /$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; } } + elsif ($rowkeytype eq 'URLWITHQUERY') { + if ("$urlwithnoquery$tokenquery$standalonequery" =~ /$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; } + } elsif ($rowkeytype eq 'REFERER') { if ($field[$pos_referer] =~ /$rowkeytypeval/) { $rowkeyval = "$1"; $rowkeyok = 1; last; } }