From: miker Date: Wed, 25 Jun 2008 16:34:47 +0000 (+0000) Subject: add item and feed ids where appropriate X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1d888bca859f96a8acbbfafcb2c1605ef1988234;p=Evergreen.git add item and feed ids where appropriate git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2_2@9927 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 1262685d69..aee47e374e 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm @@ -679,6 +679,7 @@ sub bookbag_feed { 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 @@ sub create_record_feed { $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); diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm index 6d382a37d1..ba9d3cc848 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm @@ -281,7 +281,7 @@ sub id { 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 link { ); } +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';