Lines 103-112
sub search {
Link Here
|
103 |
|
103 |
|
104 |
my $limit; |
104 |
my $limit; |
105 |
# If iDisplayLength == -1, we want to display all patrons |
105 |
# If iDisplayLength == -1, we want to display all patrons |
106 |
if ( $dt_params->{iDisplayLength} > -1 ) { |
106 |
if ( !$dt_params->{iDisplayLength} || $dt_params->{iDisplayLength} > -1 ) { |
107 |
# In order to avoid sql injection |
107 |
# In order to avoid sql injection |
108 |
$dt_params->{iDisplayStart} =~ s/\D//g; |
108 |
$dt_params->{iDisplayStart} =~ s/\D//g if defined($dt_params->{iDisplayStart}); |
109 |
$dt_params->{iDisplayLength} =~ s/\D//g; |
109 |
$dt_params->{iDisplayLength} =~ s/\D//g if defined($dt_params->{iDisplayLength}); |
110 |
$dt_params->{iDisplayStart} //= 0; |
110 |
$dt_params->{iDisplayStart} //= 0; |
111 |
$dt_params->{iDisplayLength} //= 20; |
111 |
$dt_params->{iDisplayLength} //= 20; |
112 |
$limit = "LIMIT $dt_params->{iDisplayStart},$dt_params->{iDisplayLength}"; |
112 |
$limit = "LIMIT $dt_params->{iDisplayStart},$dt_params->{iDisplayLength}"; |
113 |
- |
|
|