[LON-CAPA-cvs] cvs: loncom /interface lonrss.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 02 Oct 2006 16:47:57 -0000
albertel Mon Oct 2 12:47:57 2006 EDT
Modified files:
/loncom/interface lonrss.pm
Log:
- blog post links weren't being saved.
- don't force blog posts to be against the local machine, they could be pointing else where on the internet
Index: loncom/interface/lonrss.pm
diff -u loncom/interface/lonrss.pm:1.27 loncom/interface/lonrss.pm:1.28
--- loncom/interface/lonrss.pm:1.27 Fri Aug 11 16:11:47 2006
+++ loncom/interface/lonrss.pm Mon Oct 2 12:47:57 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network
# RSS Feeder
#
-# $Id: lonrss.pm,v 1.27 2006/08/11 20:11:47 albertel Exp $
+# $Id: lonrss.pm,v 1.28 2006/10/02 16:47:57 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -339,7 +339,7 @@
&editentry($id,$uname,$udom,$feedname,
$env{'form.'.$id.'_title'},
$env{'form.'.$id.'_description'},
- $env{'form.'.$id.'_url'},
+ $env{'form.'.$id.'_link'},
$env{'form.'.$id.'_status'},
$env{'form.'.$id.'_enclosureurl'},
$env{'form.'.$id.'_enclosuretype'},
@@ -402,12 +402,16 @@
} else { # not in edit mode, just displaying
if (($newsfeed{$id.'_status'} ne 'public') && ($viewpubliconly)) { next; }
if ($newsfeed{$id.'_status'} eq 'hidden') { next; }
+ my $link = $newsfeed{$id.'_link'};
+ if ($link =~ m|^/| ) {
+ $link = "http://".$ENV{'HTTP_HOST'}.$link;
+ }
$r->print("\n".($html?"\n<li><b>":"<item>\n<title>").$newsfeed{$id.'_title'}.
($html?"</b><br />\n":"</title>\n<description>").
$newsfeed{$id.'_description'}.
($html?"<br />\n<a href='":"</description>\n<link>").
- "http://".$ENV{'HTTP_HOST'}.
- $newsfeed{$id.'_link'}.
+
+ $link.
($html?("'>".&mt('Read more')."</a><br />\n"):"</link>\n"));
# Enclosure? Get stats
if ($newsfeed{$id.'_enclosureurl'}) {