From fe64e45a75d219b67aa2eefafa384e2e1d1c4fd0 Mon Sep 17 00:00:00 2001 From: miker Date: Wed, 8 Mar 2006 14:32:02 +0000 Subject: [PATCH 1/1] adding opac bookbag output type git-svn-id: svn://svn.open-ils.org/ILS/trunk@3280 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm index 776a68d1af..e5843af16e 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm @@ -282,8 +282,6 @@ sub bookbag_feed { my $apache = shift; return Apache2::Const::DECLINED if (-e $apache->filename); - print "Content-type: application/xml; charset=utf-8\n\n"; - my $cgi = new CGI; (my $unapi = $cgi->url) =~ s{[^/]+/?$}{unapi}; @@ -298,6 +296,13 @@ sub bookbag_feed { my $bucket = $actor->request("open-ils.actor.container.public.flesh", 'biblio', $id)->gather(1); my $bucket_tag = "tag:$host,$year:record_bucket/$id"; + if ($type eq 'opac') { + print "Location: $base/../../../opac/en-US/skin/default/xml/rresult.xml?rt=list&" . + join('&', map { "rl=" . $_->target_biblio_record_entry } @{ $bucket->items }) . + "\n\n"; + return Apache2::Const::OK; + } + my $feed = create_record_feed( $type, [ map { $_->target_biblio_record_entry } @{ $bucket->items } ], @@ -312,6 +317,7 @@ sub bookbag_feed { $feed->link(rss2 => $base . "/bookbag/rss2/$id"); $feed->link(html => $base . "/bookbag/html/$id"); + print "Content-type: application/xml; charset=utf-8\n\n"; print entityize($feed->toString) . "\n"; return Apache2::Const::OK; -- 2.43.2