[open-ils-commits] r9090 - in branches/rel_1_2/Open-ILS: src/perlmods/OpenILS/WWW src/perlmods/OpenILS/WWW/SuperCat web/opac/skin/default/js

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Mar 19 22:04:33 EDT 2008


Author: miker
Date: 2008-03-19 21:30:09 -0400 (Wed, 19 Mar 2008)
New Revision: 9090

Modified:
   branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
   branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm
   branches/rel_1_2/Open-ILS/web/opac/skin/default/js/myopac.js
Log:
using rss2 instead of atom, to make the feed readers and live bookmarks happy

Modified: branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm
===================================================================
--- branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm	2008-03-20 01:29:33 UTC (rev 9089)
+++ branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm	2008-03-20 01:30:09 UTC (rev 9090)
@@ -231,7 +231,7 @@
 	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 @@
 	$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 @@
 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 @@
 	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;

Modified: branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
===================================================================
--- branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm	2008-03-20 01:29:33 UTC (rev 9089)
+++ branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm	2008-03-20 01:30:09 UTC (rev 9090)
@@ -698,8 +698,8 @@
 	$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 @@
 	$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 @@
 	);
 
 	$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'
 	);

Modified: branches/rel_1_2/Open-ILS/web/opac/skin/default/js/myopac.js
===================================================================
--- branches/rel_1_2/Open-ILS/web/opac/skin/default/js/myopac.js	2008-03-20 01:29:33 UTC (rev 9089)
+++ branches/rel_1_2/Open-ILS/web/opac/skin/default/js/myopac.js	2008-03-20 01:30:09 UTC (rev 9090)
@@ -974,7 +974,7 @@
 			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);
 



More information about the open-ils-commits mailing list