• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item6162: Comment plugin doesn't know about Compare Revisions

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension CommentPlugin Enhancement New   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

CommentPlugin incorrectly allows comment submission in a CompareRevisionsPlugin display.

Needs a better mechanism, but it's easy to extend the current kludge:

--- 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 ) = @_;

-- TWiki:Main/TimotheLitt - 11 Jan 2009

ItemTemplate
Summary Comment plugin doesn't know about Compare Revisions
ReportedBy TWiki:Main.TimotheLitt
Codebase 4.2.3
SVN Range TWiki-5.0.0, Wed, 22 Oct 2008, build 17677
AppliesTo Extension
Component CommentPlugin
Priority Enhancement
CurrentState New
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Topic revision: r1 - 2009-01-11 - TimotheLitt
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback