[Koha-cvs] koha/C4 Koha.pm [rel_3_0]
Henri-Damien LAURENT
laurenthdl at alinto.com
Fri Feb 9 18:16:37 CET 2007
CVSROOT: /cvsroot/koha
Module name: koha
Branch: rel_3_0
Changes by: Henri-Damien LAURENT <hdl> 07/02/09 17:16:37
Modified files:
C4 : Koha.pm
Log message:
Bug Fixing :
- Using fetchall_arrayref where it could seem appropriate (a very Cool DBI feature) maybe a little faster than querying record by record.
- Adding a test of existance of a value in an eq test.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Koha.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.40.2.36&r2=1.40.2.37
Patches:
Index: Koha.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Koha.pm,v
retrieving revision 1.40.2.36
retrieving revision 1.40.2.37
diff -u -b -r1.40.2.36 -r1.40.2.37
--- Koha.pm 9 Feb 2007 17:11:52 -0000 1.40.2.36
+++ Koha.pm 9 Feb 2007 17:16:37 -0000 1.40.2.37
@@ -17,7 +17,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: Koha.pm,v 1.40.2.36 2007/02/09 17:11:52 hdl Exp $
+# $Id: Koha.pm,v 1.40.2.37 2007/02/09 17:16:37 hdl Exp $
use strict;
require Exporter;
@@ -25,7 +25,7 @@
use C4::Output;
use vars qw($VERSION @ISA @EXPORT);
-$VERSION = do { my @v = '$Revision: 1.40.2.36 $' =~ /\d+/g; shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v ); };
+$VERSION = do { my @v = '$Revision: 1.40.2.37 $' =~ /\d+/g; shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v ); };
=head1 NAME
@@ -925,7 +925,7 @@
for my $hash (@$sort_by_loop) {
#warn "sort by: $sort_by ... hash:".$hash->{value};
- if ( $hash->{value} eq $sort_by ) {
+ if ($sort_by && $hash->{value} eq $sort_by ) {
$hash->{selected} = "selected";
}
}
@@ -1497,11 +1497,8 @@
my $sth = $dbh->prepare($query);
$sth->execute;
- my @authloop;
- while ( my $data = $sth->fetchrow_hashref ) {
- push @authloop, $data;
- }
- return \@authloop;
+ my $data = $sth->fetchall_arrayref({});
+ return $data;
}
=item fixEncoding
More information about the Koha-cvs
mailing list