From f1968c9d40ee3d655fd3ac5fd9837f98a4f3ae23 Mon Sep 17 00:00:00 2001 From: Patrick Donelan Date: Sun, 1 Feb 2009 16:11:47 +1100 Subject: [PATCH] passiveLog entry should land in the first bucket that matches, not all buckets that match. Added help info about escaping meta-characters in regexps. --- lib/WebGUI/Workflow/Activity/BucketPassiveAnalytics.pm | 4 ++++ lib/WebGUI/i18n/English/PassiveAnalytics.pm | 2 ++ 2 files changed, 6 insertions(+) diff --git a/lib/WebGUI/Workflow/Activity/BucketPassiveAnalytics.pm b/lib/WebGUI/Workflow/Activity/BucketPassiveAnalytics.pm index 170d50dfb..b66c2a806 100644 --- a/lib/WebGUI/Workflow/Activity/BucketPassiveAnalytics.pm +++ b/lib/WebGUI/Workflow/Activity/BucketPassiveAnalytics.pm @@ -107,7 +107,11 @@ EOSQL1 my $bucketFound = 0; RULE: foreach my $rule (@rules) { next RULE unless $rule->matchesBucket($entry); + + # Into the bucket she goes.. $bucketSth->execute([$entry->{userId}, $rule->get('bucketName'), $entry->{delta}, $entry->{stamp}]); + $bucketFound = 1; + last RULE; } if (!$bucketFound) { $bucketSth->execute([$entry->{userId}, 'Other', $entry->{delta}, $entry->{stamp}]); diff --git a/lib/WebGUI/i18n/English/PassiveAnalytics.pm b/lib/WebGUI/i18n/English/PassiveAnalytics.pm index b46a12eca..205cc5f24 100644 --- a/lib/WebGUI/i18n/English/PassiveAnalytics.pm +++ b/lib/WebGUI/i18n/English/PassiveAnalytics.pm @@ -52,6 +52,8 @@ $ = end of url
* = any amount
+ = 1 or more
? = 0 or 1
+Meta characters should be backslash-escaped if you want to match them as ordinary text, e.g.
+home\?func=match, or
|, lastUpdated => 0, context => q||