Bug 35907: Tidy execute_query
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
26014e62da
commit
2f702d2387
1 changed files with 18 additions and 20 deletions
|
@ -556,7 +556,6 @@ and that the number placeholders matches the number of parameters.
|
|||
=cut
|
||||
|
||||
sub execute_query {
|
||||
|
||||
my $params = shift;
|
||||
my $sql = $params->{sql};
|
||||
my $offset = $params->{offset} || 0;
|
||||
|
@ -594,7 +593,8 @@ sub execute_query {
|
|||
|
||||
Koha::Logger->get->debug(
|
||||
sprintf "User has supplied (OFFSET,) LIMIT = %s, %s",
|
||||
$useroffset, ( defined($userlimit) ? $userlimit : 'UNDEF' ) );
|
||||
$useroffset, ( defined($userlimit) ? $userlimit : 'UNDEF' )
|
||||
);
|
||||
|
||||
$offset += $useroffset;
|
||||
if ( defined($userlimit) ) {
|
||||
|
@ -616,9 +616,7 @@ sub execute_query {
|
|||
->info("Report starting: $report_id") if $report_id;
|
||||
|
||||
my $sth = $dbh->prepare($sql);
|
||||
eval {
|
||||
$sth->execute(@$sql_params, $offset, $limit);
|
||||
};
|
||||
eval { $sth->execute( @$sql_params, $offset, $limit ); };
|
||||
warn $@ if $@;
|
||||
|
||||
Koha::Logger->get( { prefix => 0, interface => 'reports', category => 'execute.time.end' } )
|
||||
|
|
Loading…
Reference in a new issue