|
Lines 257-263
Returns a resultset of lists marked as public.
Link Here
|
| 257 |
sub filter_by_public { |
257 |
sub filter_by_public { |
| 258 |
my ($self) = @_; |
258 |
my ($self) = @_; |
| 259 |
|
259 |
|
| 260 |
return $self->search({ public => 1 }); |
260 |
return $self->search( { public => 1 } ); |
| 261 |
} |
261 |
} |
| 262 |
|
262 |
|
| 263 |
=head3 filter_by_readable |
263 |
=head3 filter_by_readable |
|
Lines 272-278
sub filter_by_readable {
Link Here
|
| 272 |
my ( $self, $params ) = @_; |
272 |
my ( $self, $params ) = @_; |
| 273 |
|
273 |
|
| 274 |
Koha::Exceptions::MissingParameter->throw("Mandatory patron_id parameter missing") |
274 |
Koha::Exceptions::MissingParameter->throw("Mandatory patron_id parameter missing") |
| 275 |
unless $params->{patron_id}; |
275 |
unless $params->{patron_id}; |
| 276 |
|
276 |
|
| 277 |
return $self->search( { '-or' => { public => 1, owner => $params->{patron_id} } } ); |
277 |
return $self->search( { '-or' => { public => 1, owner => $params->{patron_id} } } ); |
| 278 |
} |
278 |
} |