--- Action.r11560 2006-10-11 17:22:16.000000000 +0200
+++ Action.pm 2006-10-26 16:43:16.719594382 +0200
@@ -175,8 +175,11 @@
$descr =~ s/\r+//o;
# Translate newlines in the description to XHTML tags
+ unless(TWiki::Func::getPreferencesValue('ACTIONTRACKERPLUGIN_DISABLE_NEWLINE_TRANSLATION')) # NielsKoldso: Oct-06 Allow non-translation of newlines
+ {
$descr =~ s/\n\n/
/gos;
$descr =~ s/\n/
/gos;
+ }
$descr =~ s/%(ACTION\w*)\{/%$1\{/gso;
$this->{text} = $descr;
@@ -344,9 +347,14 @@
}
}
}
- if ( $descr =~ m/<(p|br)\s*\/>/io ) {
+ # NielsKoldso: Oct 06 Allow non-translation of newlines
+ my $newlineRE = (TWiki::Func::getPreferencesValue('ACTIONTRACKERPLUGIN_DISABLE_NEWLINE_TRANSLATION')?'\n':'<(p|br)\s*\/>');
+ if ( $descr =~ m/$newlineRE/s ) {
+ unless(TWiki::Func::getPreferencesValue('ACTIONTRACKERPLUGIN_DISABLE_NEWLINE_TRANSLATION'))
+ {
$descr =~ s//\n\n/gio;
$descr =~ s/
/\n/gio;
+ }
my $term = 'EOF';
while ( $descr =~ m/^$term/m ) {
$term .= 'F';
@@ -525,7 +533,7 @@
if ( $val eq 'late' ) {
return ( $this->secsToGo() < 0 && $this->{state} ne 'closed' ) ? 1 : 0;
} else {
- return ( $this->{state} eq $val );
+ return ( $this->{state} =~ m/$val/); # Niels Koldso Oct 2006 Make reg-exp match of states (except for state late)
}
}
@@ -602,7 +610,7 @@
if ( $asHTML && defined( $type ) && $type eq 'href' ) {
# Generate a jump-to in wiki syntax
- $text =~ s/
/\n/sgo;
+ $text =~ s/
/\n/sgo unless(TWiki::Func::getPreferencesValue('ACTIONTRACKERPLUGIN_DISABLE_NEWLINE_TRANSLATION')); # NielsKoldso: Oct 2006 Allow non-translation of newlines
# Would be nice to do the goto as a button image....
my $jump = ' '.
CGI::a( { href=>
@@ -832,8 +840,12 @@
sub createFromQuery {
my ( $web, $topic, $an, $query ) = @_;
my $desc = $query->param( 'text' ) || 'No description';
+ # NielsKoldso: Oct 2006 Allow non-translation of newlines
+ unless(TWiki::Func::getPreferencesValue('ACTIONTRACKERPLUGIN_DISABLE_NEWLINE_TRANSLATION'))
+ {
$desc =~ s/\r?\n\r?\n/ /sgo;
$desc =~ s/\r?\n/
/sgo;
+ }
# for each of the legal attribute types, see if the query
# contains a value for that attribute. If it does, fill it