[open-ils-commits] r9092 - in trunk/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:14:30 EDT 2008


Author: miker
Date: 2008-03-19 21:40:07 -0400 (Wed, 19 Mar 2008)
New Revision: 9092

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
   trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm
   trunk/Open-ILS/web/opac/skin/default/js/myopac.js
Log:
fixing the freshmeat feed link; moving to rss v2 from atom for feeds, to make feed readers happier

Modified: trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm	2008-03-20 01:38:22 UTC (rev 9091)
+++ trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat/Feed.pm	2008-03-20 01:40:07 UTC (rev 9092)
@@ -235,7 +235,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;
 }
@@ -299,7 +299,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;
 }
 
@@ -312,7 +312,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;
 }
@@ -361,7 +361,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: trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm	2008-03-20 01:38:22 UTC (rev 9091)
+++ trunk/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm	2008-03-20 01:40:07 UTC (rev 9092)
@@ -746,8 +746,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 . "/atom-full/$id" => 'application/atom+xml');
 	$feed->link(html => $base . "/html-full/$id" => 'text/html');
 	$feed->link(unapi => $unapi);
 
@@ -782,7 +782,7 @@
 
 	my $url = $cgi->url(-path_info=>$add_path);
 	my $root = (split 'feed', $url)[0];
-	my $base = (split 'freshmeat', $url)[0] . 'freshmeat';
+	my $base = (split 'freshmeat', $url)[0] . '/freshmeat';
 	my $unapi = (split 'feed', $url)[0] . 'unapi';
 
 	my $path = $cgi->path_info;
@@ -815,8 +815,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);
 
@@ -1112,13 +1112,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: trunk/Open-ILS/web/opac/skin/default/js/myopac.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/myopac.js	2008-03-20 01:38:22 UTC (rev 9091)
+++ trunk/Open-ILS/web/opac/skin/default/js/myopac.js	2008-03-20 01:40:07 UTC (rev 9092)
@@ -980,7 +980,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