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.

Item736: Comment plugin doesn't know about Compare Revisions

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Closed Extension CommentPlugin Main.KennethLavrsen
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

ItemTemplate edit

Summary Comment plugin doesn't know about Compare Revisions
ReportedBy TimotheLitt
Codebase 1.0.0
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component CommentPlugin
Priority Normal
CurrentState Closed
WaitingFor KennethLavrsen
Checkins Foswikirev:1952
TargetRelease patch
ReleasedIn 1.0.1
Topic revision: r5 - 23 Feb 2009 - 02:52:32 - KennethLavrsen
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads