From 65745662c72573ac16854000ee45f8276000a822 Mon Sep 17 00:00:00 2001 From: miker Date: Thu, 25 Aug 2005 21:25:27 +0000 Subject: [PATCH] bug fixing git-svn-id: svn://svn.open-ils.org/ILS/trunk@1744 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../OpenILS/Application/Storage/Publisher/biblio.pm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/biblio.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/biblio.pm index 20ffdd54f6..7459020f8c 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/biblio.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/biblio.pm @@ -258,7 +258,7 @@ sub record_copy_status_count { FROM $cp_table cp, $cn_table cn, $cl_table cl, - $cs_table cs, + $cs_table cs WHERE cn.record = ? AND cp.call_number = cn.id AND cp.location = cl.id @@ -274,16 +274,17 @@ sub record_copy_status_count { $sth->execute("$rec"); my ($ou,$cn) = (0,''); - my @data = (); + my %data = (); for my $row (@{$sth->fetchall_arrayref}) { if ($cn and $cn ne $$row[1]) { - $client->respond( [$ou, $cn, @data] ); - @data = (); + my $i = 0; + $client->respond( [$ou, $cn, \%data] ); + %data = (); } ($ou,$cn) = ($$row[0],$$row[1]); - push @data, $$row[3]; + $data{$$row[2]} = $$row[3]; } - return [$ou, $cn, @data] if ($ou); + return [$ou, $cn, \%data] if ($ou); return undef; } __PACKAGE__->register_method( -- 2.43.2