Need help?

Contact SCC

Email scicomp
Join #scicomp on Slack

Help us help you

Follow these guidelines when submitting a help request.

PerlDoc

18 Dec 2024 - 14:20 | Version 1 |
See PublishedAPI for packages intended to be used by Plugin and Contrib authors, or browse all packages.
See also Developing plugins, Developer's Bible, Technical Overview


internal package Foswiki::Plugins::RevCommentPlugin

base class to hook into the foswiki core

initPlugin($topic, $web, $user) → $boolean

initialize the plugin, automatically called during the core initialization process

finisPlugin()

clean up after session has finished

getCore()

get core of this plugin

beforeSaveHandler($text, $topic, $web, $meta )

called before a topic is saved to the store

beforeUploadHandler(\%attrHash, $meta )

called before an attachment is uploaded or changed

afterRenameHandler( $oldWeb, $oldTopic, $oldAttachment, $newWeb, $newTopic, $newAttachment )

called when a topic or attachment has been renamed

setComment($commentOrObj) → $hash

public api to register a revision comment for the next save operation

example:

my $comment = Foswiki::Plugins::setComment({
                 text => "revision message",
                 minor => 0 / 1, # optional 
              });

my $comment = Foswiki::Plugins::setComment("revision message");

The $comment return value is the object being used in the final store procedure creating the revision comment. It will be invalidated once the save handler have been executed. So don't keep hold of them for too long.

Copyright © Simons Foundation. All material on this collaboration platform is the property of the Simons Foundation.
This website is using cookies. More info. That's Fine