#=================================================================== #RCS file: RCS/ApprovalPlugin.pm,v #retrieving revision 1.1 diff -u -r1.1 ApprovalPlugin.pm --- ApprovalPlugin.pm 2005/08/31 12:55:17 1.1 +++ ApprovalPlugin.pm 2005/08/31 13:32:29 @@ -61,6 +61,7 @@ $prefNeedsApproval $globWorkflow $globWebName + $globWikiName $globCurrentState $globApprovalMessage $globAllowEdit $CalledByMyself @@ -86,6 +87,7 @@ $debug =1; $globWebName=$web; + $globWikiName=$user; my( $meta, $text ) = TWiki::Func::readTopic( $web, $topic ); @@ -225,6 +227,13 @@ } } + # show last who (approver) tags + foreach my $key (keys %{$globCurrentState}) { + if ($key =~ /^LASTWHO_/) { + $_[0] =~ s!%APPROVAL$key%!$globCurrentState->{$key}!g; + } + } + # display the message for current status $_[0] =~ s!%APPROVALSTATEMESSAGE%!$globApprovalMessage!g; @@ -515,6 +524,7 @@ $globCurrentState->{state}=$state; $globCurrentState->{"LASTVERSION_$state"}="1.$version"; $globCurrentState->{"LASTTIME_$state"} = Timestamp(); + $globCurrentState->{"LASTWHO_$state"} = $globWikiName; $meta->remove( "APPROVAL" ); $meta->put( "APPROVAL", %{$globCurrentState});