--- loncom/interface/lonmeta.pm 2004/01/15 15:12:31 1.58 +++ loncom/interface/lonmeta.pm 2004/01/15 20:22:47 1.59 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Metadata display handler # -# $Id: lonmeta.pm,v 1.58 2004/01/15 15:12:31 www Exp $ +# $Id: lonmeta.pm,v 1.59 2004/01/15 20:22:47 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -434,7 +434,30 @@ sub handler { my $uri=$r->uri; - unless ($uri=~/^\/\~/) { +# ====================================================== Looking for all bombs? + if ($uri=~/\/adm\/bombs\/(.*)$/) { +# ----------------------------------------------------------- Set document type + $uri=&Apache::lonnet::declutter($1); + &Apache::loncommon::content_type($r,'text/html'); + $r->send_http_header; + + return OK if $r->header_only; + $r->print(&Apache::loncommon::bodytag('Error Messages')); + $r->print('

'.&Apache::lonnet::clutter($uri).'

'); + my ($domain,$author)=($uri=~/^(\w+)\/(\w+)\//); + if (&Apache::loncacc::constructaccess('/~'.$author.'/',$domain)) { + my %brokenurls=&Apache::lonmsg::all_url_author_res_msg($author,$domain); + foreach (sort keys %brokenurls) { + if ($_=~/^\Q$uri\E/) { + $r->print(&Apache::lonhtmlcommon::crumbs(&Apache::lonnet::clutter($_)). + &Apache::lonmsg::retrieve_author_res_msg($_).'
'); + } + } + } else { + $r->print(&mt('Not authorized')); + } + $r->print(''); + } elsif ($uri!~/^\/\~/) { # =========================================== This is not in construction space my ($resdomain,$resuser)= (&Apache::lonnet::declutter($uri)=~/^(\w+)\/(\w+)\//); @@ -610,27 +633,21 @@ ENDHEAD $target=~s/\.meta$//; my $bombs=&Apache::lonmsg::retrieve_author_res_msg($target); if ($bombs) { - my $del=''; - if ($target=~/allbombs$/) { - $disuri='All Error Messages'; - } else { - if ($ENV{'form.delmsg'}) { - if (&Apache::lonmsg::del_url_author_res_msg($target) eq 'ok') { - $bombs=&mt('Messages deleted.'); - } else { - $bombs=&mt('Error deleting messages'); - } + if ($ENV{'form.delmsg'}) { + if (&Apache::lonmsg::del_url_author_res_msg($target) eq 'ok') { + $bombs=&mt('Messages deleted.'); + } else { + $bombs=&mt('Error deleting messages'); } - $del=''; } my $bodytag=&Apache::loncommon::bodytag('Error Messages'); + my $del=&mt('Delete Messages'); $r->print(<Edit Catalog Information $bodytag

$disuri

-$del +
$bombs
@@ -704,9 +721,9 @@ ENDEDIT $r->print( '
'); + } } - return OK; - } + return OK; } # ================================================================= BEGIN Block