[open-ils-commits] r9927 - in branches/rel_1_2_2/Open-ILS/src/perlmods/OpenILS/WWW: . SuperCat

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Jun 25 12:34:49 EDT 2008


Author: miker
Date: 2008-06-25 12:34:47 -0400 (Wed, 25 Jun 2008)
New Revision: 9927

Modified:
   branches/rel_1_2_2/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
   branches/rel_1_2_2/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm
Log:
add item and feed ids where appropriate

Modified: branches/rel_1_2_2/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm
===================================================================
--- branches/rel_1_2_2/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm	2008-06-25 16:34:30 UTC (rev 9926)
+++ branches/rel_1_2_2/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm	2008-06-25 16:34:47 UTC (rev 9927)
@@ -281,7 +281,7 @@
 	my $self = shift;
 	my $id = shift;
 
-	$self->_create_node( '/atom:feed', 'http://www.w3.org/2005/Atom', 'id', $id );
+	$self->_create_node( $self->{item_xpath}, 'http://www.w3.org/2005/Atom', 'id', $id );
 }
 
 package OpenILS::WWW::SuperCat::Feed::atom::item;
@@ -350,6 +350,13 @@
 	);
 }
 
+sub id {
+	my $self = shift;
+	my $id = shift;
+
+	$self->_create_node($self->{item_xpath}, undef,'guid', $id);
+}
+
 package OpenILS::WWW::SuperCat::Feed::rss2::item;
 use base 'OpenILS::WWW::SuperCat::Feed::rss2';
 

Modified: branches/rel_1_2_2/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
===================================================================
--- branches/rel_1_2_2/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm	2008-06-25 16:34:30 UTC (rev 9926)
+++ branches/rel_1_2_2/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm	2008-06-25 16:34:47 UTC (rev 9927)
@@ -679,6 +679,7 @@
 	return Apache2::Const::NOT_FOUND unless($bucket);
 
 	my $bucket_tag = "tag:$host,$year:record_bucket/$id";
+	$feed->id($bucket_tag);
 	if ($type eq 'opac') {
 		print "Location: $root/../../en-US/skin/default/xml/rresult.xml?rt=list&" .
 			join('&', map { "rl=" . $_->target_biblio_record_entry } @{ $bucket->items }) .
@@ -1163,7 +1164,7 @@
 			$node->add_holdings($xml);
 		}
 
-		$node->id($item_tag) if ($flesh);
+		$node->id($item_tag);
 		#$node->update_ts(clense_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);



More information about the open-ils-commits mailing list