[open-ils-commits] r8224 -
trunk/Open-ILS/src/perlmods/OpenILS/Application/Search
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Dec 16 14:57:53 EST 2007
Author: miker
Date: 2007-12-16 14:36:40 -0500 (Sun, 16 Dec 2007)
New Revision: 8224
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
Log:
add root ou to the search
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm 2007-12-16 19:30:15 UTC (rev 8223)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm 2007-12-16 19:36:40 UTC (rev 8224)
@@ -537,8 +537,15 @@
my $authtoken = shift;
my $args = shift;
+ my $cstore = OpenSRF::AppSession->connect('open-ils.cstore');
+
+ my $ou = $cstore->request(
+ 'open-ils.cstore.direct.actor.org_unit.search',
+ { parent_ou => undef }
+ )->gather(1);
+
my $result = { service => 'native-evergreen-catalog', records => [] };
- my $searchhash = { limit => $$args{limit}, offset => $$args{offset}};
+ my $searchhash = { limit => $$args{limit}, offset => $$args{offset}, org_unit => $ou->id };
$$searchhash{searches}{title} = $$args{search}{title};
$$searchhash{searches}{author} = $$args{search}{author};
@@ -555,7 +562,6 @@
if ($list->{count} > 0) {
$result->{count} = $list->{count};
- my $cstore = OpenSRF::AppSession->connect('open-ils.cstore');
my $records = $cstore->request(
'open-ils.cstore.direct.biblio.record_entry.search.atomic',
{ id => [ map { ( $_->[0] ) } @{$list->{ids}} ] }
More information about the open-ils-commits
mailing list