[open-ils-commits] r11184 - trunk/Open-ILS/src/perlmods/OpenILS/WWW

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Nov 14 10:53:21 EST 2008


Author: erickson
Date: 2008-11-14 10:53:19 -0500 (Fri, 14 Nov 2008)
New Revision: 11184

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
Log:
fix thinko with format list; add -full support; fill in unapi, search and next/prev links

Modified: trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm	2008-11-14 13:36:30 UTC (rev 11183)
+++ trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm	2008-11-14 15:53:19 UTC (rev 11184)
@@ -143,6 +143,9 @@
 		->request("open-ils.supercat.record.formats")
 		->gather(1);
 
+    $list = [ map { (keys %$_)[0] } @$list ];
+    push @$list, 'htmlholdings','html';
+
     for my $browse_axis ( qw/title author subject topic series/ ) {
         for my $record_browse_format ( @$list ) {
             {
@@ -153,8 +156,16 @@
                 	my $record_list = shift;
                 	my $prev = shift;
                 	my $next = shift;
+                	my $real_format = shift || $__f;
+                	my $unapi = shift;
+                	my $base = shift;
+                	my $site = shift;
 
-                	my $feed = create_record_feed( 'record', $__f, $record_list, undef, undef, 0 );
+                	my $feed = create_record_feed( 'record', $real_format, $record_list, $unapi, $site, $real_format =~ /-full$/o ? 1 : 0 );
+                	$feed->root( "$base/../" );
+                	$feed->lib( $site );
+                	$feed->link( next => $next => $feed->type );
+                	$feed->link( previous => $prev => $feed->type );
 
                 	return (
                         "Content-type: ". $feed->type ."; charset=utf-8\n\n",
@@ -1309,7 +1320,9 @@
 		$page
 	)->gather(1);
 
-	my ($header,$content) = $browse_types{$axis}{$format}->($tree,$prev,$next);
+    (my $norm_format = $format) =~ s/-full$//o;
+
+	my ($header,$content) = $browse_types{$axis}{$norm_format}->($tree,$prev,$next,$format,$unapi,$base,$site);
 	print $header.$content;
 	return Apache2::Const::OK;
 }



More information about the open-ils-commits mailing list