Bug 18854: Protect few other occurrences of offset
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
aabf001232
commit
9f47bd8825
|
|
@ -240,7 +240,7 @@ sub SearchAuthorities {
|
|||
$query="\@or $orderstring $query" if $orderstring;
|
||||
}
|
||||
|
||||
$offset=0 unless $offset;
|
||||
$offset = 0 if not defined $offset or $offset < 0;
|
||||
my $counter = $offset;
|
||||
$length=10 unless $length;
|
||||
my @oAuth;
|
||||
|
|
|
|||
|
|
@ -327,7 +327,8 @@ sub simple_search_compat {
|
|||
return ('No query entered', undef, undef) unless $query;
|
||||
|
||||
my %options;
|
||||
$options{offset} = $offset // 0;
|
||||
$offset = 0 if not defined $offset or $offset < 0;
|
||||
$options{offset} = $offset;
|
||||
$max_results //= 100;
|
||||
|
||||
unless (ref $query) {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@ my $input = new CGI;
|
|||
my $tagfield = $input->param('tagfield');
|
||||
my $tagsubfield = $input->param('tagsubfield');
|
||||
my $authtypecode = $input->param('authtypecode');
|
||||
my $offset = $input->param('offset') || 0;
|
||||
my $offset = $input->param('offset');
|
||||
$offset = 0 if not defined $offset or $offset < 0;
|
||||
my $op = $input->param('op') || '';
|
||||
my $script_name = "/cgi-bin/koha/admin/auth_subfields_structure.pl";
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,8 @@ my $authtypecode = $input->param('authtypecode') || ''; # set
|
|||
my $existingauthtypecode = $input->param('existingauthtypecode') || ''; # set when we have to create a new framework (in authtype) by copying an old one (in existingauthtype)
|
||||
|
||||
my $searchfield = $input->param('searchfield') || 0;
|
||||
my $offset = $input->param('offset') || 0;
|
||||
my $offset = $input->param('offset');
|
||||
$offset = 0 if not defined $offset or $offset < 0;
|
||||
my $op = $input->param('op') || '';
|
||||
$searchfield =~ s/\,//g;
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,8 @@ my $tagfield = $input->param('tagfield');
|
|||
my $tagsubfield = $input->param('tagsubfield');
|
||||
my $frameworkcode = $input->param('frameworkcode');
|
||||
my $pkfield = "tagfield";
|
||||
my $offset = $input->param('offset') || 0;
|
||||
my $offset = $input->param('offset');
|
||||
$offset = 0 if not defined $offset or $offset < 0;
|
||||
my $script_name = "/cgi-bin/koha/admin/marc_subfields_structure.pl";
|
||||
|
||||
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
|
||||
|
|
|
|||
Loading…
Reference in New Issue