[open-ils-commits] r16750 - trunk/Open-ILS/src/perlmods/OpenILS/WWW (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Jun 18 10:41:25 EDT 2010


Author: miker
Date: 2010-06-18 10:41:23 -0400 (Fri, 18 Jun 2010)
New Revision: 16750

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
Log:
support unapi tag embedding in authority records

Modified: trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm	2010-06-18 04:48:03 UTC (rev 16749)
+++ trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm	2010-06-18 14:41:23 UTC (rev 16750)
@@ -194,7 +194,7 @@
                 	my $site = shift;
 
 			$log->info("Creating record feed with params [$real_format, $record_list, $unapi, $site]");
-                	my $feed = create_record_feed( 'authority', $real_format, $record_list, $unapi, $site, 0 );
+                	my $feed = create_record_feed( 'authority', $real_format, $record_list, $unapi, $site, undef, $real_format =~ /-full$/o ? -1 : 0 );
                 	$feed->root( "$base/../" );
                 	$feed->link( next => $next => $feed->type );
                 	$feed->link( previous => $prev => $feed->type );
@@ -1360,8 +1360,10 @@
 
 		my $item_tag = "tag:$host,$year:biblio-record_entry/$rec/$lib";
 		$item_tag = "tag:$host,$year:isbn/$rec/$lib" if ($search eq 'isbn');
-		$item_tag = "tag:$host,$year:authorit-record_entry/$rec" if ($search eq 'authority');
+		$item_tag .= "/$depth" if (defined($depth));
 
+		$item_tag = "tag:$host,$year:authority-record_entry/$rec" if ($search eq 'authority');
+
 		my $xml = $supercat->request(
 			"open-ils.supercat.$search.$type.retrieve",
 			$rec
@@ -1372,7 +1374,7 @@
 		next unless $node;
 
 		$xml = '';
-		if ($lib && ($type eq 'marcxml' || $type eq 'atom') &&  $flesh) {
+		if ($lib && ($type eq 'marcxml' || $type eq 'atom') &&  $flesh > 0) {
 			my $r = $supercat->request( "open-ils.supercat.$search.holdings_xml.retrieve", $rec, $lib, $flesh_feed, $paging );
 			while ( !$r->complete ) {
 				$xml .= join('', map {$_->content} $r->recv);
@@ -1383,8 +1385,8 @@
 
 		$node->id($item_tag);
 		#$node->update_ts(cleanse_ISO8601($record->edit_date));
-		$node->link(alternate => $feed->unapi . "?id=$item_tag&format=htmlholdings-full" => 'text/html') if ($flesh);
-		$node->link(opac => $feed->unapi . "?id=$item_tag&format=opac") if ($flesh);
+		$node->link(alternate => $feed->unapi . "?id=$item_tag&format=htmlholdings-full" => 'text/html') if ($flesh > 0);
+		$node->link(opac => $feed->unapi . "?id=$item_tag&format=opac") if ($flesh > 0);
 		$node->link(unapi => $feed->unapi . "?id=$item_tag") if ($flesh);
 		$node->link('unapi-id' => $item_tag) if ($flesh);
 	}



More information about the open-ils-commits mailing list