Lines 66-85
sub search_filtered {
Link Here
|
66 |
|
66 |
|
67 |
=head3 single_library_mode |
67 |
=head3 single_library_mode |
68 |
|
68 |
|
69 |
Aka singleBranchMode. |
|
|
70 |
|
71 |
my $boolean = Koha::Libraries->single_library_mode; |
69 |
my $boolean = Koha::Libraries->single_library_mode; |
72 |
|
70 |
|
73 |
Returns 1 if there is only one library marked public. |
71 |
Returns 1 if there is only one library marked public. |
74 |
|
72 |
|
75 |
=cut |
73 |
=cut |
76 |
|
74 |
|
77 |
sub single_library_mode { # formerly called singleBranchMode |
75 |
sub single_library_mode { |
78 |
my $self = shift; |
76 |
my $self = shift; |
79 |
if( $self->search({ public => 1 })->count == 1 ) { # Historically we test number==1 instead of number<2 |
77 |
|
80 |
return 1; |
78 |
# Historically we test number==1 instead of number<2 |
81 |
} |
79 |
return $self->search({ public => 1 })->count == 1 ? 1 : 0; |
82 |
return 0; |
|
|
83 |
} |
80 |
} |
84 |
|
81 |
|
85 |
=head3 type |
82 |
=head3 type |
86 |
- |
|
|