Lines 62-68
my $dbh = C4::Context->dbh;
Link Here
|
62 |
my $limit = $input->param('limit'); |
62 |
my $limit = $input->param('limit'); |
63 |
$limit = 10 unless ($limit && $limit =~ /^\d+$/); # control user input for SQL query |
63 |
$limit = 10 unless ($limit && $limit =~ /^\d+$/); # control user input for SQL query |
64 |
$limit = 100 if $limit > 100; |
64 |
$limit = 100 if $limit > 100; |
65 |
my $branch = $input->param('branch') || ''; |
65 |
my $branch_input = $input->param('branch') || ''; |
|
|
66 |
my $branch = $branch_input eq '__ANY__' ? '' : $branch_input ; # __ANY__ is used to distinguish form display and no branch filter selected |
66 |
my $itemtype = $input->param('itemtype') || ''; |
67 |
my $itemtype = $input->param('itemtype') || ''; |
67 |
my $timeLimit = $input->param('timeLimit') || 3; |
68 |
my $timeLimit = $input->param('timeLimit') || 3; |
68 |
my $advanced_search_types = C4::Context->preference('AdvancedSearchTypes'); |
69 |
my $advanced_search_types = C4::Context->preference('AdvancedSearchTypes'); |
Lines 138-144
$template->param(do_it => 1,
Link Here
|
138 |
results_loop => \@results, |
139 |
results_loop => \@results, |
139 |
); |
140 |
); |
140 |
|
141 |
|
141 |
$template->param( branchloop => GetBranchesLoop(C4::Context->userenv?C4::Context->userenv->{'branch'}:'')); |
142 |
# GetBranchesLoop without parameter will select user default branch |
|
|
143 |
my $branchloop = $branch_input ? GetBranchesLoop($branch_input) : GetBranchesLoop(); |
144 |
$template->param( branchloop => $branchloop ); |
142 |
|
145 |
|
143 |
# the index parameter is different for item-level itemtypes |
146 |
# the index parameter is different for item-level itemtypes |
144 |
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype'; |
147 |
my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype'; |
145 |
- |
|
|