Tags:
create new tag
, view all tags

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

TWiki version: TWikiRelease04x00x02
TWiki plugins: DefaultPlugin, EmptyPlugin, ContributorsPlugin
Server OS: Linux
Web server: Apache
Perl version: 5.8.6
Client OS: Windows
Web Browser: Firefox
Categories: Fatal error, Contributing code, Plugins

-- PeterScott - 28 Apr 2006

Answer

ALERT! 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
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback