add item and feed ids where appropriate
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 25 Jun 2008 16:34:47 +0000 (16:34 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 25 Jun 2008 16:34:47 +0000 (16:34 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2_2@9927 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm

index 1262685..aee47e3 100644 (file)
@@ -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);
index 6d382a3..ba9d3cc 100644 (file)
@@ -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';