Lines 55-61
my $dbh = C4::Context->dbh;
Link Here
|
55 |
my $limit = $input->param('limit'); |
55 |
my $limit = $input->param('limit'); |
56 |
$limit = 10 unless ($limit && $limit =~ /^\d+$/); # control user input for SQL query |
56 |
$limit = 10 unless ($limit && $limit =~ /^\d+$/); # control user input for SQL query |
57 |
$limit = 100 if $limit > 100; |
57 |
$limit = 100 if $limit > 100; |
58 |
my $branch = $input->param('branch') || ''; |
58 |
my $branch_input = $input->param('branch') || ''; |
|
|
59 |
my $branch = $branch_input eq '__ANY__' ? '' : $branch_input ; # __ANY__ is used to distinguish form display and no branch filter selected |
59 |
my $itemtype = $input->param('itemtype') || ''; |
60 |
my $itemtype = $input->param('itemtype') || ''; |
60 |
my $timeLimit = $input->param('timeLimit') || 3; |
61 |
my $timeLimit = $input->param('timeLimit') || 3; |
61 |
my $advanced_search_types = C4::Context->preference('AdvancedSearchTypes'); |
62 |
my $advanced_search_types = C4::Context->preference('AdvancedSearchTypes'); |
Lines 131-137
$template->param(do_it => 1,
Link Here
|
131 |
results_loop => \@results, |
132 |
results_loop => \@results, |
132 |
); |
133 |
); |
133 |
|
134 |
|
134 |
$template->param( branchloop => GetBranchesLoop(C4::Context->userenv?C4::Context->userenv->{'branch'}:'')); |
135 |
# GetBranchesLoop without parameter will select user default branch |
|
|
136 |
my $branchloop = $branch_input ? GetBranchesLoop($branch_input) : GetBranchesLoop(); |
137 |
$template->param( branchloop => $branchloop ); |
135 |
|
138 |
|
136 |
# the index parameter is different for item-level itemtypes |
139 |
# the index parameter is different for item-level itemtypes |
137 |
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype'; |
140 |
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype'; |
138 |
- |
|
|