Bug 27604: (QA follow-up) Limit the libraries during the query
Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> (cherry picked from commit60a749ff5a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commit1951169055) Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
This commit is contained in:
parent
cd8fd0bb45
commit
ec0cee795f
|
|
@ -74,18 +74,12 @@ if ( $action eq q{} ) {
|
|||
|
||||
my $mandatory = GetMandatoryFields($action);
|
||||
|
||||
my @libraries = Koha::Libraries->search;
|
||||
my $params = undef;
|
||||
if ( $action eq 'create' || $action eq 'new' ) {
|
||||
my @PatronSelfRegistrationLibraryList = split '\|', C4::Context->preference('PatronSelfRegistrationLibraryList');
|
||||
if (@PatronSelfRegistrationLibraryList) {
|
||||
@libraries = map {
|
||||
my $l = $_;
|
||||
( grep { $l->branchcode eq $_ } @PatronSelfRegistrationLibraryList )
|
||||
? $l
|
||||
: ()
|
||||
} @libraries;
|
||||
}
|
||||
$params = { branchcode => { -in => \@PatronSelfRegistrationLibraryList } };
|
||||
}
|
||||
my @libraries = Koha::Libraries->search($params);
|
||||
|
||||
my ( $min, $max ) = C4::Members::get_cardnumber_length();
|
||||
if ( defined $min ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue