[open-ils-commits] r19584 - branches/rel_2_1/Open-ILS/src/perlmods/lib/OpenILS/WWW (dbwells)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Mar 4 14:47:59 EST 2011


Author: dbwells
Date: 2011-03-04 14:47:54 -0500 (Fri, 04 Mar 2011)
New Revision: 19584

Modified:
   branches/rel_2_1/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
Log:
Respect a setting of depth=0. In particular, this fixes holdings requests for branch-level searches with an 'Everything' scope.


Modified: branches/rel_2_1/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
===================================================================
--- branches/rel_2_1/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm	2011-03-04 19:46:13 UTC (rev 19583)
+++ branches/rel_2_1/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm	2011-03-04 19:47:54 UTC (rev 19584)
@@ -536,7 +536,7 @@
         $lib_id = $lib_object->id;
 
         $ou_types = $actor->request( 'open-ils.actor.org_types.retrieve' )->gather(1);
-        $lib_depth = $depth || (grep { $_->id == $lib_object->ou_type } @$ou_types)[0]->depth;
+        $lib_depth = defined($depth) ? $depth : (grep { $_->id == $lib_object->ou_type } @$ou_types)[0]->depth;
     }
 
     if ($command eq 'browse') {



More information about the open-ils-commits mailing list