[open-ils-commits] r17002 - trunk/Open-ILS/src/perlmods/OpenILS/WWW (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Jul 21 16:07:02 EDT 2010
Author: miker
Date: 2010-07-21 16:06:56 -0400 (Wed, 21 Jul 2010)
New Revision: 17002
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
Log:
protect acn, acp and auri from our $lib faking
Modified: trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm 2010-07-21 19:58:44 UTC (rev 17001)
+++ trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm 2010-07-21 20:06:56 UTC (rev 17002)
@@ -482,13 +482,16 @@
)->gather(1)->[0]->shortname;
}
- my $lib_object = $actor->request(
- 'open-ils.actor.org_unit_list.search' => shortname => $lib
- )->gather(1)->[0];
- my $lib_id = $lib_object->id;
+ my ($lib_object,$lib_id,$ou_types,$lib_depth);
+ if ($type ne 'acn' && $type ne 'acp' && $type ne 'auri') {
+ $lib_object = $actor->request(
+ 'open-ils.actor.org_unit_list.search' => shortname => $lib
+ )->gather(1)->[0];
+ $lib_id = $lib_object->id;
- my $ou_types = $actor->request( 'open-ils.actor.org_types.retrieve' )->gather(1);
- my $lib_depth = $depth || (grep { $_->id == $lib_object->ou_type } @$ou_types)[0]->depth;
+ $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;
+ }
if ($command eq 'browse') {
print "Location: $root/browse/$base_format/$scheme/$lib/$id\n\n";
More information about the open-ils-commits
mailing list