[open-ils-commits] r16761 - trunk/Open-ILS/src/perlmods/OpenILS/WWW (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jun 18 12:56:00 EDT 2010
Author: miker
Date: 2010-06-18 12:55:57 -0400 (Fri, 18 Jun 2010)
New Revision: 16761
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
Log:
make sure $depth is defined, and used
Modified: trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm 2010-06-18 16:10:59 UTC (rev 16760)
+++ trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm 2010-06-18 16:55:57 UTC (rev 16761)
@@ -359,7 +359,7 @@
my $format = $cgi->param('format');
my $flesh_feed = parse_feed_type($format);
(my $base_format = $format) =~ s/(-full|-uris)$//o;
- my ($id,$type,$command,$lib,$paging) = ('','','');
+ my ($id,$type,$command,$lib,$depth,$paging) = ('','','');
if (!$format) {
my $body = "Content-type: application/xml; charset=utf-8\n\n";
@@ -487,7 +487,7 @@
my $lib_id = $lib_object->id;
my $ou_types = $actor->request( 'open-ils.actor.org_types.retrieve' )->gather(1);
- my $lib_depth = (grep { $_->id == $lib_object->ou_type } @$ou_types)[0]->depth;
+ my $lib_depth = $depth || (grep { $_->id == $lib_object->ou_type } @$ou_types)[0]->depth;
if ($type eq 'call_number' and $command eq 'browse') {
print "Location: $root/browse/$base_format/call_number/$lib/$id\n\n";
More information about the open-ils-commits
mailing list