Question
I don't know yet whether this is complete, but below is a patch that at least appears to get
ContributorsPlugin working on 4.0.2. Prior to this it had fatal errors (was calling an object method as a function, etc).
diff -u ContributorsPlugin.pm~ ContributorsPlugin.pm
--- ContributorsPlugin.pm~ Fri Apr 28 15:09:46 2006
+++ ContributorsPlugin.pm Fri Apr 28 15:55:32 2006
@@ -91,7 +91,7 @@
&TWiki::Func::writeDebug( "- ContributorsPlugin::commonTagsHandler( $_[2].$_[1] )" ) if $debug;
$_[0] =~ s/%CONTRIBUTORS%/&handleContributors($_[1], $_[2])/ge;
- $_[0] =~ s/%CONTRIBUTORS{(.*?)}%/&handleContributors($_[1], $_[2], $1)/ge;
+ $_[0] =~ s/%CONTRIBUTORS\{(.*?)\}%/&handleContributors($_[1], $_[2], $1)/ge;
}
@@ -123,10 +123,10 @@
# If there someday is a way to get all the rev info at once, this should
# take advantage of that.
for ($revision=$maxRevision; $revision>($maxRevision-$last); $revision--) {
- my @lines = &TWiki::Store::getRevisionInfo($web, $topic, $revision);
+ my @lines = $TWiki::Plugins::SESSION->{store}->getRevisionInfo($web, $topic, $revision);
for ($lineIndex = 0; $lineIndex < $#lines; $lineIndex += 4) {
my $date = &TWiki::Func::formatTime($lines[$lineIndex+0], "http");
- my $author = $lines[$lineIndex+1];
+ my $author = $lines[$lineIndex+1]->wikiName;
my $revisionNumber = $lines[$lineIndex+2];
my $comment = $lines[$lineIndex+3];
$contributorLine = &formatContributorLine($web, $topic, $author, $date, $revision, $format);
Environment
--
PeterScott - 28 Apr 2006
Answer
If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.
Thanks Peter for contributing the patch. With some little more changes it will work on Cairo and Dakar, as described in
HandlingCairoDakarPluginDifferences. I added a pointer to this topic in
ContributorsPluginDev.
--
PeterThoeny - 28 Apr 2006
Topic revision: r3 - 29 Apr 2006 - 09:11:44 -
WillNorris