Skip to content

Commit 79c1d96

Browse files
committed
don't require a PAUSE account to +1
1 parent a8448e6 commit 79c1d96

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/MetaCPAN/Web/Controller/Search.pm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ sub index : Path {
2626
$c->detach;
2727
}
2828
else {
29-
my $pause_id = $c->user ? $c->user->pause_id : undef;
29+
my $user = $c->user_exists ? $c->user->id : undef;
3030

3131
$query =~ s{author:([a-zA-Z]*)}{author:uc($1)}e;
3232

3333
my $results
3434
= $query =~ /distribution:/
35-
? $model->search_distribution( $query, $from, $pause_id )
36-
: $model->search_collapsed( $query, $from, $pause_id );
35+
? $model->search_distribution( $query, $from, $user )
36+
: $model->search_collapsed( $query, $from, $user );
3737

3838
my $authors = $c->model('API::Author')->search( $query, $from );
3939
( $results, $authors ) = ( $results->recv, $authors->recv );

root/inc/favorite.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<% IF user_exists && user.pause_id -%>
1+
<% IF user_exists -%>
22
<form action="/account/favorite/add" style="display: inline" onsubmit="return favDistribution(this)">
33
<% IF module.myfavorite %><input type="hidden" name="remove" value="1"><% END -%>
44
<input type="hidden" name="release" value="<% module.release || module.name %>">

0 commit comments

Comments
 (0)