Diff for /loncom/publisher/lonpubdir.pm between versions 1.77 and 1.78

version 1.77, 2005/02/28 08:22:09 version 1.78, 2005/04/07 06:56:26
Line 61  sub handler { Line 61  sub handler {
              $fn,$r->dir_config('lonDefDomain'));                $fn,$r->dir_config('lonDefDomain')); 
   unless (($uname) && ($udom)) {    unless (($uname) && ($udom)) {
      $r->log_reason($uname.' at '.$udom.       $r->log_reason($uname.' at '.$udom.
          ' trying to list directory '.$ENV{'form.filename'}.           ' trying to list directory '.$env{'form.filename'}.
          ' ('.$fn.') - not authorized',            ' ('.$fn.') - not authorized', 
          $r->filename);            $r->filename); 
      return HTTP_NOT_ACCEPTABLE;       return HTTP_NOT_ACCEPTABLE;
Line 72  sub handler { Line 72  sub handler {
   $fn=~s/\/$//;    $fn=~s/\/$//;
   
   unless ($fn) {     unless ($fn) { 
      $r->log_reason($ENV{'user.name'}.' at '.$ENV{'user.domain'}.       $r->log_reason($env{'user.name'}.' at '.$env{'user.domain'}.
          ' trying to list empty directory', $r->filename);            ' trying to list empty directory', $r->filename); 
      return HTTP_NOT_FOUND;       return HTTP_NOT_FOUND;
   }     } 
Line 91  sub handler { Line 91  sub handler {
   my %bombs=&Apache::lonmsg::all_url_author_res_msg($uname,$udom);    my %bombs=&Apache::lonmsg::all_url_author_res_msg($uname,$udom);
   
   &startpage($r, $uname, $udom, $thisdisfn);   # Put out the start of page.    &startpage($r, $uname, $udom, $thisdisfn);   # Put out the start of page.
   if ($ENV{'environment.remote'} eq 'off') {    if ($env{'environment.remote'} eq 'off') {
       &dircontrols($r,$uname,$udom,$thisdisfn);    # Put out actions for directory,         &dircontrols($r,$uname,$udom,$thisdisfn);    # Put out actions for directory, 
                                                # browse/upload + new file page.                                                 # browse/upload + new file page.
   } else {    } else {
Line 148  sub getEffectiveUrl { Line 148  sub getEffectiveUrl {
     my $r = shift;      my $r = shift;
     my $fn;      my $fn;
           
     if ($ENV{'form.filename'}) { # If a form filename is defined.      if ($env{'form.filename'}) { # If a form filename is defined.
  $fn=$ENV{'form.filename'};   $fn=$env{'form.filename'};
  #   #
  #   Replace the ~username of the URL with /home/username/public_html   #   Replace the ~username of the URL with /home/username/public_html
  #   so that we don't have to worry about ~ expansion internally.   #   so that we don't have to worry about ~ expansion internally.
Line 206  sub startpage { Line 206  sub startpage {
                  'this.form.action=this.form.recent.value;this.form.submit()').                   'this.form.action=this.form.recent.value;this.form.submit()').
               '</form>';                '</form>';
     &Apache::lonhtmlcommon::store_recent('construct',$formaction,$formaction);      &Apache::lonhtmlcommon::store_recent('construct',$formaction,$formaction);
     if ($ENV{'environment.remote'} eq 'off') {      if ($env{'environment.remote'} eq 'off') {
  $ENV{'request.noversionuri'}=$currdir.'/';   $env{'request.noversionuri'}=$currdir.'/';
  $r->print(&Apache::loncommon::bodytag('Construction Space',undef,undef,undef,undef,undef,$pagetitle));   $r->print(&Apache::loncommon::bodytag('Construction Space',undef,undef,undef,undef,undef,$pagetitle));
     } else {      } else {
  $r->print($pagetitle);   $r->print($pagetitle);
Line 333  parent.lastknownpriv='/~$uname$thisdisfn Line 333  parent.lastknownpriv='/~$uname$thisdisfn
 ENDPUBDIRSCRIPT  ENDPUBDIRSCRIPT
     $r->print($pubdirscript);      $r->print($pubdirscript);
   
     if ((($uname ne $ENV{'user.name'}) || ($udom ne $ENV{'user.domain'})) &&      if ((($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) &&
  $ENV{'environment.remote'} ne 'off') {   $env{'environment.remote'} ne 'off') {
  $r->print('<h3>'.&mt('Co-Author').': '.$uname.' at '.$udom.   $r->print('<h3>'.&mt('Co-Author').': '.$uname.' at '.$udom.
   '</h3>');    '</h3>');
     }      }

Removed from v.1.77  
changed lines
  Added in v.1.78


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