[Koha-bugs] [Bug 11703] Convert checkouts table to ajax datatable

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jul 4 03:29:47 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11703

--- Comment #181 from David Cook <dcook at prosentient.com.au> ---
Comment on attachment 29472
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29472
Bug 11703 - Convert checkouts table to ajax datatable

Review of attachment 29472:
 --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=11703&attachment=29472)
-----------------------------------------------------------------

::: svc/checkouts.pl
@@ +3,5 @@
> +# This software is placed under the gnu General Public License, v2 (http://www.gnu.org/licenses/gpl.html)
> +
> +# Copyright 2014 ByWater Solutions
> +#
> +# This file is part of Koha.

What does this service do exactly? 

Does it just list current checkouts? Is Jesse going to develop this service
further to perform actual checkouts or is he creating a new service for that?
If so, I think this service name might be confusing...

@@ +19,5 @@
> +# with Koha; if not, write to the Free Software Foundation, Inc.,
> +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
> +
> +use strict;
> +use warnings;

Probably should've used Modern::Perl here instead.

@@ +94,5 @@
> +if ( @borrowernumber == 1 ) {
> +    $sql .= '= ?';
> +}
> +else {
> +    $sql = ' IN (' . join( ',', ('?') x @borrowernumber ) . ') ';

If @borrowernumber is empty and the environmental variable DEBUG is active,
this SQL query would trigger a fatal software error in MySQL/MariaDB.

I doubt that many people run with DEBUG on, and this service "should" always be
called with at least one borrowernumber parameter, but I think it makes sense
to remove the possibility of generating invalid SQL in the first place. 

Even without DEBUG on, the logs will still contain MySQL errors for invalid SQL
syntax.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list