diff --git a/lib/MetaCPAN/Web/Controller/Release.pm b/lib/MetaCPAN/Web/Controller/Release.pm index 56c62a4314..4d3448b641 100644 --- a/lib/MetaCPAN/Web/Controller/Release.pm +++ b/lib/MetaCPAN/Web/Controller/Release.pm @@ -63,6 +63,16 @@ sub view : Private { $c->detach( '/internal_error', $error ); } )->get; + ## Remove author from contributors list + my $author_name = $data->{author}->{name}; + my $contributors = []; + foreach my $contributor ( @{ $data->{contributors} } ) { + if ( $contributor->{name} !~ /\b$author_name\b/ ) { + push @$contributors, $contributor; + } + } + $data->{contributors} = $contributors; + my $release = $data->{release}; $c->browser_max_age('1h'); diff --git a/root/inc/contributors.tx b/root/inc/contributors.tx index 93178adb97..5c73556a42 100644 --- a/root/inc/contributors.tx +++ b/root/inc/contributors.tx @@ -1,7 +1,7 @@
%% if $contributors.size() {