Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
don't require a PAUSE account to +1
  • Loading branch information
monken committed Aug 18, 2011
1 parent a8448e6 commit 79c1d96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/MetaCPAN/Web/Controller/Search.pm
Expand Up @@ -26,14 +26,14 @@ sub index : Path {
$c->detach;
}
else {
my $pause_id = $c->user ? $c->user->pause_id : undef;
my $user = $c->user_exists ? $c->user->id : undef;

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

my $results
= $query =~ /distribution:/
? $model->search_distribution( $query, $from, $pause_id )
: $model->search_collapsed( $query, $from, $pause_id );
? $model->search_distribution( $query, $from, $user )
: $model->search_collapsed( $query, $from, $user );

my $authors = $c->model('API::Author')->search( $query, $from );
( $results, $authors ) = ( $results->recv, $authors->recv );
Expand Down
2 changes: 1 addition & 1 deletion root/inc/favorite.html
@@ -1,4 +1,4 @@
<% IF user_exists && user.pause_id -%>
<% IF user_exists -%>
<form action="/account/favorite/add" style="display: inline" onsubmit="return favDistribution(this)">
<% IF module.myfavorite %><input type="hidden" name="remove" value="1"><% END -%>
<input type="hidden" name="release" value="<% module.release || module.name %>">
Expand Down

0 comments on commit 79c1d96

Please sign in to comment.