Diff for /loncom/publisher/lonpubdir.pm between versions 1.4 and 1.8

version 1.4, 2001/04/09 23:49:04 version 1.8, 2001/05/26 15:29:22
Line 10 Line 10
 # 03/23 Guy Albertelli  # 03/23 Guy Albertelli
 # 03/24,03/29 Gerd Kortemeyer)  # 03/24,03/29 Gerd Kortemeyer)
 #  #
 # 03/31,04/03 Gerd Kortemeyer  # 03/31,04/03,05/09 Gerd Kortemeyer
   
 package Apache::lonpubdir;  package Apache::lonpubdir;
   
Line 18  use strict; Line 18  use strict;
 use Apache::File;  use Apache::File;
 use File::Copy;  use File::Copy;
 use Apache::Constants qw(:common :http :methods);  use Apache::Constants qw(:common :http :methods);
   use Apache::loncacc;
   use Apache::lonnet;
   
   
 sub handler {  sub handler {
Line 33  sub handler { Line 35  sub handler {
   } else {    } else {
       $fn=$r->filename();        $fn=$r->filename();
   }    }
   
     my $uname;
     my $udom;
   
     unless (($uname,$udom)=
       &Apache::loncacc::constructaccess(
                $fn,$r->dir_config('lonDefDomain'))) {
        $r->log_reason($uname.' at '.$udom.
            ' trying to publish file '.$ENV{'form.filename'}.
            ' ('.$fn.') - not authorized', 
            $r->filename); 
        return HTTP_NOT_ACCEPTABLE;
     }
             
   $fn=~s/\/$//;    $fn=~s/\/$//;
   
Line 44  sub handler { Line 59  sub handler {
   
 # ----------------------------------------------------------- Start page output  # ----------------------------------------------------------- Start page output
   
   my $uname=$ENV{'user.name'};  
   my $udom=$ENV{'user.domain'};  
   
   $r->content_type('text/html');    $r->content_type('text/html');
   $r->send_http_header;    $r->send_http_header;
Line 59  sub handler { Line 72  sub handler {
   $thisdisfn=~s/^\/home\/$uname\/public_html//;    $thisdisfn=~s/^\/home\/$uname\/public_html//;
       
   $r->print('<h1>Construction Space Directory <tt>'.$thisdisfn.'/</tt></h1>');    $r->print('<h1>Construction Space Directory <tt>'.$thisdisfn.'/</tt></h1>');
     
     if (($uname ne $ENV{'user.name'}) || ($udom ne $ENV{'user.domain'})) {
             $r->print('<h3><font color=red>Co-Author: '.$uname.' at '.$udom.
                  '</font></h3>');
     }
   
   
   my $docroot=$r->dir_config('lonDocRoot');    my $docroot=$r->dir_config('lonDocRoot');
   
Line 92  sub handler { Line 111  sub handler {
             } else {              } else {
                 $status='Modified';                  $status='Modified';
                 $bgcol='#FFFFBB';                  $bgcol='#FFFFBB';
                   if 
               (&Apache::lonnet::fileembstyle(($filename=~/\.(\w+)$/)) eq 'ssi') {
                      $status.='<br><a href="/adm/diff?filename=/~'.$uname.
                                            '/'.$filename.
          '&versionone=priv" target=cat>Diffs</a>';
           }
             }                 }   
  }   }
          $r->print('<tr bgcolor='.$bgcol.           $r->print('<tr bgcolor='.$bgcol.

Removed from v.1.4  
changed lines
  Added in v.1.8


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>
500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.