From: dbs Date: Thu, 16 Sep 2010 20:31:26 +0000 (+0000) Subject: Enable bookbags to have a target searchOrg that sets the appropriate search scope... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b9f17dcbedf9606ba9f92b76e94464a51adc7e66;p=Evergreen.git Enable bookbags to have a target searchOrg that sets the appropriate search scope in opac mode For example, http://example.com/opac/extras/feed/bookbag/opac/2378?skin=sparkly&searchOrg=BR1 would resolve to a scope of BR1 in the dynamic OPAC. There is a more sophisticated version of this in 2.0/trunk; this is just a stop-gap measure until then. git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6@17747 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm index a8f13afac3..89d1ad7f32 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm @@ -781,6 +781,7 @@ sub bookbag_feed { my $skin = $cgi->param('skin') || 'default'; my $locale = $cgi->param('locale') || 'en-US'; + my $org_sn = $cgi->param('searchOrg') || '-'; $root =~ s{(?request("open-ils.actor.org_unit_list.search", "shortname", $org_sn)->gather(1); + if ($ou) { + $scope = '&l=' . $ou->[0]->id; + } + } + print "Location: $root/../../$locale/skin/$skin/xml/rresult.xml?rt=list$scope&" . join('&', map { "rl=" . $_->target_biblio_record_entry } @{ $bucket->items }) . "\n\n"; return 302;