using rss2 instead of atom, to make the feed readers and live bookmarks happy
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 20 Mar 2008 01:30:09 +0000 (01:30 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 20 Mar 2008 01:30:09 +0000 (01:30 +0000)
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
Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm
Open-ILS/web/opac/skin/default/js/myopac.js

index 02ffb55..de08b22 100644 (file)
@@ -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'
        );
index 92def65..7bf6a70 100644 (file)
@@ -231,7 +231,7 @@ sub new {
        my $self = $class->SUPER::build('<feed xmlns:atom="http://www.w3.org/2005/Atom"/>');
        $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('<rss version="2.0"><channel/></rss>');
-       $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;
index c2ad3d7..1f81700 100644 (file)
@@ -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);