version 1.58, 2004/01/15 15:12:31
|
version 1.59, 2004/01/15 20:22:47
|
Line 434 sub handler {
|
Line 434 sub handler {
|
|
|
my $uri=$r->uri; |
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('<h1>'.&Apache::lonnet::clutter($uri).'</h1>'); |
|
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($_).'<hr />'); |
|
} |
|
} |
|
} else { |
|
$r->print(&mt('Not authorized')); |
|
} |
|
$r->print('</body></html>'); |
|
} elsif ($uri!~/^\/\~/) { |
# =========================================== This is not in construction space |
# =========================================== This is not in construction space |
my ($resdomain,$resuser)= |
my ($resdomain,$resuser)= |
(&Apache::lonnet::declutter($uri)=~/^(\w+)\/(\w+)\//); |
(&Apache::lonnet::declutter($uri)=~/^(\w+)\/(\w+)\//); |
Line 610 ENDHEAD
|
Line 633 ENDHEAD
|
$target=~s/\.meta$//; |
$target=~s/\.meta$//; |
my $bombs=&Apache::lonmsg::retrieve_author_res_msg($target); |
my $bombs=&Apache::lonmsg::retrieve_author_res_msg($target); |
if ($bombs) { |
if ($bombs) { |
my $del=''; |
if ($ENV{'form.delmsg'}) { |
if ($target=~/allbombs$/) { |
if (&Apache::lonmsg::del_url_author_res_msg($target) eq 'ok') { |
$disuri='All Error Messages'; |
$bombs=&mt('Messages deleted.'); |
} else { |
} else { |
if ($ENV{'form.delmsg'}) { |
$bombs=&mt('Error deleting messages'); |
if (&Apache::lonmsg::del_url_author_res_msg($target) eq 'ok') { |
|
$bombs=&mt('Messages deleted.'); |
|
} else { |
|
$bombs=&mt('Error deleting messages'); |
|
} |
|
} |
} |
$del='<input type="submit" name="delmsg" value="'. |
|
&mt('Delete Messages').'" />'; |
|
} |
} |
my $bodytag=&Apache::loncommon::bodytag('Error Messages'); |
my $bodytag=&Apache::loncommon::bodytag('Error Messages'); |
|
my $del=&mt('Delete Messages'); |
$r->print(<<ENDBOMBS); |
$r->print(<<ENDBOMBS); |
<html><head><title>Edit Catalog Information</title></head> |
<html><head><title>Edit Catalog Information</title></head> |
$bodytag |
$bodytag |
<h1>$disuri</h1> |
<h1>$disuri</h1> |
<form method="post" name="defaultmeta"> |
<form method="post" name="defaultmeta"> |
$del |
<input type="submit" name="delmsg" value="$del" /> |
<br />$bombs |
<br />$bombs |
</form> |
</form> |
</body> |
</body> |
Line 704 ENDEDIT
|
Line 721 ENDEDIT
|
$r->print( |
$r->print( |
'<br /><input type="submit" name="store" value="'. |
'<br /><input type="submit" name="store" value="'. |
&mt('Store Catalog Information').'"></form></body></html>'); |
&mt('Store Catalog Information').'"></form></body></html>'); |
|
} |
} |
} |
return OK; |
return OK; |
} |
|
} |
} |
|
|
# ================================================================= BEGIN Block |
# ================================================================= BEGIN Block |