Priority: Normal
Current State: Closed
Released In: 1.0.1
Target Release: patch
CommentPlugin incorrectly allows comment submission in a
CompareRevisionsPlugin display.
Needs a better mechanism, but it's easy to extend the current kludge:
(Patch against TWiki, but foswiki code is identical)
--- lib/TWiki/Plugins/CommentPlugin.pm.4.2.3 2008-09-11 23:41:58.000000000 -0400
+++ lib/TWiki/Plugins/CommentPlugin.pm 2009-01-11 06:48:14.000000000 -0500
@@ -62,13 +62,13 @@
return unless $_[0] =~ m/%COMMENT({.*?})?%/o;
# SMELL: Nasty, tacky way to find out where we were invoked from
my $scriptname = $ENV{'SCRIPT_NAME'} || '';
# SMELL: unreliable
- my $previewing = ($scriptname =~ /\/(preview|gnusave|rdiff)/);
+ my $previewing = ($scriptname =~ /\/(preview|gnusave|rdiff|compare)/);
TWiki::Plugins::CommentPlugin::Comment::prompt( $previewing,
$_[0], $web, $topic );
}
sub beforeSaveHandler {
#my ( $text, $topic, $web ) = @_;
--
TimotheLitt
Good catch
even if the code warns about nasty hacks etc it works for the other modes and why not make Comment aware of another important plugin
I will take this one when I am back in Denmark in 24 hours
--
KennethLavrsen - 11 Jan 2009