From e4289e678c05264c60ea1ff4be92be6bcef6a56a Mon Sep 17 00:00:00 2001 From: miker Date: Thu, 20 Mar 2008 01:30:09 +0000 Subject: [PATCH] using rss2 instead of atom, to make the feed readers and live bookmarks happy git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2@9090 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm | 12 ++++++------ Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm | 8 ++++---- Open-ILS/web/opac/skin/default/js/myopac.js | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm index 02ffb55122..de08b22ab3 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm @@ -698,8 +698,8 @@ sub bookbag_feed { $feed->creator($host); $feed->update_ts(gmtime_ISO8601()); - $feed->link(rss => $base . "/rss2-full/$id" => 'application/rss+xml'); - $feed->link(alternate => $base . "/atom-full/$id" => 'application/atom+xml'); + $feed->link(alternate => $base . "/rss2-full/$id" => 'application/rss+xml'); + $feed->link(atom => $base . "/atmo-full/$id" => 'application/atom+xml'); $feed->link(html => $base . "/html-full/$id" => 'text/html'); $feed->link(unapi => $unapi); @@ -767,8 +767,8 @@ sub changes_feed { $feed->creator($host); $feed->update_ts(gmtime_ISO8601()); - $feed->link(rss => $base . "/rss2-full/$rtype/$axis/$limit/$date" => 'application/rss+xml'); - $feed->link(alternate => $base . "/atom-full/$rtype/$axis/$limit/$date" => 'application/atom+xml'); + $feed->link(alternate => $base . "/rss2-full/$rtype/$axis/$limit/$date" => 'application/rss+xml'); + $feed->link(atom => $base . "/atom-full/$rtype/$axis/$limit/$date" => 'application/atom+xml'); $feed->link(html => $base . "/html-full/$rtype/$axis/$limit/$date" => 'text/html'); $feed->link(unapi => $unapi); @@ -1097,13 +1097,13 @@ sub opensearch_feed { ); $feed->link( - rss => + alternate => $base . "/$version/$org/rss2-full/$class?searchTerms=$terms&searchSort=$sort&searchSortDir=$sortdir&searchLang=$lang" => 'application/rss+xml' ); $feed->link( - alternate => + atom => $base . "/$version/$org/atom-full/$class?searchTerms=$terms&searchSort=$sort&searchSortDir=$sortdir&searchLang=$lang" => 'application/atom+xml' ); diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm index 92def65cf6..7bf6a70f4b 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm @@ -231,7 +231,7 @@ sub new { my $self = $class->SUPER::build(''); $self->{doc}->documentElement->setNamespace('http://www.w3.org/2005/Atom', undef); $self->{doc}->documentElement->setNamespace('http://www.w3.org/2005/Atom', 'atom'); - $self->{type} = 'application/xml'; + $self->{type} = 'application/atom+xml'; $self->{item_xpath} = '/atom:feed'; return $self; } @@ -295,7 +295,7 @@ sub new { $self->{doc}->documentElement->setNamespace('http://www.w3.org/2005/Atom', 'atom'); $self->{item_xpath} = '/atom:entry'; $self->{holdings_xpath} = '/atom:entry'; - $self->{type} = 'application/xml'; + $self->{type} = 'application/atom+xml'; return $self; } @@ -308,7 +308,7 @@ use base 'OpenILS::WWW::SuperCat::Feed'; sub new { my $class = shift; my $self = $class->SUPER::build(''); - $self->{type} = 'application/xml'; + $self->{type} = 'application/rss+xml'; $self->{item_xpath} = '/rss/channel'; return $self; } @@ -357,7 +357,7 @@ sub new { my $class = shift; my $xml = shift; my $self = $class->SUPER::build($xml); - $self->{type} = 'application/xml'; + $self->{type} = 'application/rss+xml'; $self->{item_xpath} = '/item'; $self->{holdings_xpath} = '/item'; return $self; diff --git a/Open-ILS/web/opac/skin/default/js/myopac.js b/Open-ILS/web/opac/skin/default/js/myopac.js index c2ad3d7a6f..1f8170058c 100644 --- a/Open-ILS/web/opac/skin/default/js/myopac.js +++ b/Open-ILS/web/opac/skin/default/js/myopac.js @@ -974,7 +974,7 @@ function myOPACShowBookbags(force) { unHideMe(link); link = $n(row, 'myopac_bb_published_atom'); - link.setAttribute('href', buildExtrasLink( 'feed/bookbag/atom-full/'+cont.id(), false)); + link.setAttribute('href', buildExtrasLink( 'feed/bookbag/rss2-full/'+cont.id(), false)); link.setAttribute('target', '_blank' ); unHideMe(link); -- 2.11.0