--- loncom/interface/lonrss.pm 2008/12/10 21:46:58 1.40
+++ loncom/interface/lonrss.pm 2008/12/22 14:39:23 1.44
@@ -1,7 +1,7 @@
# The LearningOnline Network
# RSS Feeder
#
-# $Id: lonrss.pm,v 1.40 2008/12/10 21:46:58 kaisler Exp $
+# $Id: lonrss.pm,v 1.44 2008/12/22 14:39:23 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -306,8 +306,10 @@ sub handler {
my ($blocked,$blocktext,$disabled,$disabletext);
if (!&Apache::lonnet::is_course($udom,$uname)) {
($blocked,$blocktext) = &blocking_blogdisplay($uname,$udom,$html,$filterfeedname);
- $disabled = &Apache::lonnet::usertools_access($uname,$udom,'blog');
- if ($disabled) {
+ if (&Apache::lonnet::usertools_access($uname,$udom,'blog')) {
+ $disabled = 0;
+ } else {
+ $disabled = 1;
if ($html) {
$disabletext = '
'.&mt('No user blog available') .'
'.
&mt('This is a result of one of the following:').''.
@@ -323,12 +325,11 @@ sub handler {
my $title = $displayfeedname?$displayfeedname
:"Available RSS Feeds and Blogs";
my $rss_link = &Apache::lonrss::rss_link($uname,$udom);
- my @brcrumb = [{href=>$rss_link,text=>"Available RSS Feeds and Blogs"}];
+ my $brcrumb = [{href=>$rss_link,text=>"Available RSS Feeds and Blogs"}];
$r->print(&Apache::loncommon::start_page($title,$rss_link,
- {'bread_crumbs' => @brcrumb,
- 'domain' => $udom,
- 'force_register' =>
- $env{'form.register'}}).
+ {'bread_crumbs' => $brcrumb,
+ 'domain' => $udom,
+ 'force_register' => $env{'form.register'}}).
&changed_js());
} else { # render RSS
my $server = &Apache::lonnet::absolute_url();
@@ -343,7 +344,7 @@ sub handler {
my $newid = &get_new_feed_id();
# Is this user for real?
my $homeserver=&Apache::lonnet::homeserver($uname,$udom);
- if ($html && !$blocked && !&disabled) {
+ if ($html && !$blocked && !$disabled) {
# Any new feeds or renaming of feeds?
if ($edit) {
# Hide a feed?