--- loncom/interface/lonrss.pm 2006/05/11 17:38:44 1.21 +++ loncom/interface/lonrss.pm 2006/10/02 16:47:57 1.28 @@ -1,7 +1,7 @@ # The LearningOnline Network # RSS Feeder # -# $Id: lonrss.pm,v 1.21 2006/05/11 17:38:44 www Exp $ +# $Id: lonrss.pm,v 1.28 2006/10/02 16:47:57 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -29,6 +29,7 @@ package Apache::lonrss; use strict; +use LONCAPA; use Apache::Constants qw(:common); use Apache::loncommon; use Apache::lonnet; @@ -138,7 +139,8 @@ sub editentry { } my $feedname=&feedname($filename); &Apache::lonnet::put('nohist_all_rss_feeds', - { &filterfeedname($filename) => &displayfeedname($filename,$uname,$udom) }, + { &filterfeedname($filename) => + (&displayfeedname($filename,$uname,$udom))[0] }, $udom,$uname); return &Apache::lonnet::put($feedname,{ $id.'_title' => $title, @@ -197,13 +199,13 @@ sub course_blog_link { sub add_blog_entry_link { my ($id,$uname,$udom,$filename,$title,$description,$url,$status,$encurl,$enctype,$linktext)=@_; return "".$linktext.''; } @@ -239,7 +241,9 @@ sub handler { my $feedname=&feedname($filename); my ($displayfeedname,$displayoption)=&displayfeedname($filename,$uname,$udom); if ($html) { - $r->print(&Apache::loncommon::start_page(($displayfeedname?$displayfeedname:&mt("Available RSS Feeds and Blogs")),undef, + my $title = $displayfeedname?$displayfeedname + :"Available RSS Feeds and Blogs"; + $r->print(&Apache::loncommon::start_page($title,undef, {'domain' => $udom, 'force_register' => $env{'form.register'}}). @@ -335,7 +339,7 @@ sub handler { &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'}, @@ -398,12 +402,16 @@ ENDEDIT } 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