Diff for /loncom/publisher/lonunauthorized.pm between versions 1.5 and 1.7

version 1.5, 2006/04/06 22:15:19 version 1.7, 2007/03/02 23:18:19
Line 34  use Apache::loncommon; Line 34  use Apache::loncommon;
 use Apache::lonnet;  use Apache::lonnet;
 use Apache::loncacc;  use Apache::loncacc;
 use Apache::lonlocal;  use Apache::lonlocal;
   use LONCAPA();
   
 sub handler {  sub handler {
     my $r = shift;      my $r = shift;
Line 59  sub handler { Line 60  sub handler {
         my $ownerhome=&Apache::lonnet::homeserver($ownername,$ownerdomain);          my $ownerhome=&Apache::lonnet::homeserver($ownername,$ownerdomain);
         unless ($ownerhome eq 'no_host') {          unless ($ownerhome eq 'no_host') {
     $r->print(      $r->print(
  "<p>".&mt('Please log into')." <tt>".$Apache::lonnet::hostname{$ownerhome}.   "<p>".&mt('Please log into')." <tt>".&Apache::lonnet::hostname($ownerhome).
  "</tt> ".&mt('to edit.')."</p>");   "</tt> ".&mt('to edit.')."</p>");
         }          }
     } else {      } else {
         $r->print(          $r->print(
             "<h1>".              "<h1>".
  &mt("You do not have authoring privileges for this resource")."</h1>");   &mt("You do not have authoring privileges for this resource")."</h1>");
         my ($realownername)=($env{'request.editurl'}=~/\/(?:\~|priv\/|home\/)(\w+)/);          my ($realownername)=
       ($env{'request.editurl'}=~m{/(?:~|priv/|home/)($LONCAPA::username_re)});
         my $realownerhome=          my $realownerhome=
       &Apache::lonnet::homeserver(      &Apache::lonnet::homeserver($realownername,
         $realownername,$r->dir_config('lonDefDomain'));   $r->dir_config('lonDefDomain'));
         unless ($realownerhome eq 'no_host') {          unless ($realownerhome eq 'no_host') {
            $r->print("<p>".&mt('Contact')." ".      $r->print("<p>".&mt('Contact')." ".
     &Apache::loncommon::aboutmewrapper(      &Apache::loncommon::aboutmewrapper(
      &Apache::loncommon::plainname($realownername,       &Apache::loncommon::plainname($realownername,
                                $r->dir_config('lonDefDomain')).' ('.                                 $r->dir_config('lonDefDomain')).' ('.
                                $realownername.&mt(' at ').                                 $realownername.&mt(' at ').
                                $r->dir_config('lonDefDomain').')',                                 $r->dir_config('lonDefDomain').')',
        $realownername,$r->dir_config('lonDefDomain')).         $realownername,$r->dir_config('lonDefDomain')).
            ' for access.');             ' for access.</p>');
         }          }
     }      }
           

Removed from v.1.5  
changed lines
  Added in v.1.7


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>