NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use
trunk.foswiki.org to view this page for some minimal testing.
Use
Item11383 for general documentation changes for release 1.1.5. Use
Item9693 for docu changes for release 2.0.
Item9342: does not work with VirtualHostingContrib
| Priority: |
CurrentState: |
AppliesTo: |
Component: |
WaitingFor: |
| Enhancement |
Closed |
Extension |
MailerContrib |
|
Hi,
MailerContrib currently does not work with
VirtualHostingContrib's wrapper script because regular expressions in
Foswiki::Contrib::MailerContrib::WebNotify use the
o modifier, what causes them to be compiled only once. Please see the developer documentation for developers in
VirtualHostingContrib for more details.
I propose the following change to fix that (i.e. just remove the 'o' modifier from the regular expressions):
Index: MailerContrib/lib/Foswiki/Contrib/MailerContrib/WebNotify.pm
===================================================================
--- MailerContrib/lib/Foswiki/Contrib/MailerContrib/WebNotify.pm (revision 8210)
+++ MailerContrib/lib/Foswiki/Contrib/MailerContrib/WebNotify.pm (working copy)
@@ -363,13 +363,13 @@
# join \ terminated lines
$text =~ s/\\\r?\n//gs;
- my $webRE = qr/(?:$Foswiki::cfg{UsersWebName}\.)?/o;
+ my $webRE = qr/(?:$Foswiki::cfg{UsersWebName}\.)?/;
foreach my $baseline ( split( /\r?\n/, $text ) ) {
my $line =
Foswiki::Func::expandCommonVariables( $baseline, $this->{topic},
$this->{web}, $meta );
if ( $line =~
-/^\s+\*\s$webRE($Foswiki::regex{wikiWordRegex})\s+\-\s+($Foswiki::cfg{MailerContrib}{EmailFilterIn}+)\s*$/o
+/^\s+\*\s$webRE($Foswiki::regex{wikiWordRegex})\s+\-\s+($Foswiki::cfg{MailerContrib}{EmailFilterIn}+)\s*$/
&& $1 ne $Foswiki::cfg{DefaultUserWikiName} )
{
@@ -378,7 +378,7 @@
$in_pre = 0;
}
elsif ( $line =~
-/^\s+\*\s$webRE($Foswiki::regex{wikiWordRegex}|'.*?'|".*?"|$Foswiki::cfg{MailerContrib}{EmailFilterIn})\s*(:.*)?$/o
+/^\s+\*\s$webRE($Foswiki::regex{wikiWordRegex}|'.*?'|".*?"|$Foswiki::cfg{MailerContrib}{EmailFilterIn})\s*(:.*)?$/
&& $1 ne $Foswiki::cfg{DefaultUserWikiName} )
{
my $subscriber = $1;
There will be a small performance hit, but IMO being able to use
MailerContrib together with
VirtualHostingContrib pays off.
--
AntonioTerceiro - 16 Jul 2010