--- loncom/publisher/lonunauthorized.pm 2002/09/10 14:41:05 1.1 +++ loncom/publisher/lonunauthorized.pm 2005/04/07 06:56:27 1.4 @@ -1,7 +1,7 @@ # The LearningOnline Network # Unauthorized to access construction space # -# $Id: lonunauthorized.pm,v 1.1 2002/09/10 14:41:05 www Exp $ +# $Id: lonunauthorized.pm,v 1.4 2005/04/07 06:56:27 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -33,10 +33,11 @@ use Apache::Constants qw(:common); use Apache::loncommon; use Apache::lonnet; use Apache::loncacc; +use Apache::lonlocal; sub handler { my $r = shift; - $r->content_type('text/html'); + &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; return OK if $r->header_only; @@ -50,35 +51,36 @@ ENDDOCUMENT # Figure out who the user is and what they wanted to access my ($ownername,$ownerdomain)= - &Apache::loncacc::constructaccess($ENV{'request.editurl'},$r->dir_config('lonDefDomain')); + &Apache::loncacc::constructaccess($env{'request.editurl'},$r->dir_config('lonDefDomain')); # print header $r->print(&Apache::loncommon::bodytag ("Failed Access to Construction Space",'','','',$ownerdomain)); # figure out what went wrong if ($ownerdomain) { - $r->print('
The constuction space for this resource is located on another server.
" - ); + $r->print(''. +&mt('The constuction space for this resource is located on another server.'). +'
'); my $ownerhome=&Apache::lonnet::homeserver($ownername,$ownerdomain); unless ($ownerhome eq 'no_host') { $r->print( - "Please log into ".$Apache::lonnet::hostname{$ownerhome}. - " to edit.
"); + "".&mt('Please log into')." ".$Apache::lonnet::hostname{$ownerhome}. + " ".&mt('to edit.')."
"); } } else { $r->print( - "Contact ". + $r->print("
".&mt('Contact')." ". &Apache::loncommon::aboutmewrapper( &Apache::loncommon::plainname($realownername, - $r->dir_config('lonDefDomain')).'('. - $realownername.' at '. + $r->dir_config('lonDefDomain')).' ('. + $realownername.&mt(' at '). $r->dir_config('lonDefDomain').')', $realownername,$r->dir_config('lonDefDomain')). ' for access.');