Lines 220-233
sub can_make_suggestions {
Link Here
|
220 |
my ( $self ) = @_; |
220 |
my ( $self ) = @_; |
221 |
|
221 |
|
222 |
if ( C4::Context->preference('suggestion') ) { |
222 |
if ( C4::Context->preference('suggestion') ) { |
223 |
my @patron_categories = split ',', C4::Context->preference('suggestionPatronCategoryExceptions'); |
223 |
|
224 |
if ( @patron_categories ) { |
224 |
my @patron_categories = split ',', C4::Context->preference('suggestionPatronCategoryExceptions') // q{}; |
225 |
my $categorycode = $self->categorycode; |
225 |
|
226 |
return if grep {$_ eq $categorycode } @patron_categories; |
226 |
return !any {$_ eq $self->categorycode } @patron_categories; |
227 |
} |
|
|
228 |
return 1; |
229 |
} |
227 |
} |
230 |
return; |
228 |
|
|
|
229 |
return 0; |
231 |
} |
230 |
} |
232 |
|
231 |
|
233 |
=head2 Internal methods |
232 |
=head2 Internal methods |
234 |
- |
|
|