Diff for /loncom/publisher/lonpublisher.pm between versions 1.258.2.3 and 1.260

version 1.258.2.3, 2009/11/24 01:11:53 version 1.260, 2009/05/28 17:08:38
Line 1641  sub phasetwo { Line 1641  sub phasetwo {
         my $srcf=$2;          my $srcf=$2;
         my $srct=$3;          my $srct=$3;
         my $srcd=$1;          my $srcd=$1;
         my $docroot = $Apache::lonnet::perlvar{'lonDocRoot'};          unless ($srcd=~/^\/home\/httpd\/html\/res/) {
         unless ($srcd=~/^\Q$docroot\E\/res/) {  
             print $logfile "\nPANIC: Target dir is ".$srcd;              print $logfile "\nPANIC: Target dir is ".$srcd;
             $r->print(              $r->print(
  "<span class=\"LC_error\">".&mt('Invalid target directory, FAIL')."</span>");   "<span class=\"LC_error\">".&mt('Invalid target directory, FAIL')."</span>");
Line 1747  sub phasetwo { Line 1746  sub phasetwo {
 # ------------------------------------------------------------- Trigger updates  # ------------------------------------------------------------- Trigger updates
     push(@{$modified_urls},[$target,$source]);      push(@{$modified_urls},[$target,$source]);
     unless ($registered_cleanup) {      unless ($registered_cleanup) {
         my $handlers = $r->get_handlers('PerlCleanupHandler');   $r->register_cleanup(\&notify);
         $r->set_handlers('PerlCleanupHandler' => [\&notify,@{$handlers}]);  
  $registered_cleanup=1;   $registered_cleanup=1;
     }      }
   
Line 1771  sub phasetwo { Line 1769  sub phasetwo {
         my $thissrcdir=$thissrc;          my $thissrcdir=$thissrc;
         $thissrcdir=~s/\/[^\/]+$/\//;          $thissrcdir=~s/\/[^\/]+$/\//;
                   
         unless ($env{'request.role'} =~ /^aa/) {          
             $r->print(          $r->print(
                '<hr /><a href="'.$thisdistarget.'"><font size="+2">'.             '<hr /><a href="'.$thisdistarget.'"><font size="+2">'.
                &mt('View Published Version').'</font></a>');             &mt('View Published Version').'</font></a>'.
         }             '<p><a href="'.$thissrc.'"><font size="+2">'.
         $r->print('<p><a href="'.$thissrc.'"><font size="+2">'.  
   &mt('Back to Source').'</font></a></p>'.    &mt('Back to Source').'</font></a></p>'.
                   '<p><a href="'.$thissrcdir.             '<p><a href="'.$thissrcdir.
                   '"><font size="+2">'.                     '"><font size="+2">'.
   &mt('Back to Source Directory').'</font></a></p>');    &mt('Back to Source Directory').'</font></a></p>');
     }      }
     return 1;      return 1;
Line 2166  sub handler { Line 2163  sub handler {
     &Apache::loncommon::content_type($r,'text/html');      &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;      $r->send_http_header;
           
       # Breadcrumbs
       &Apache::lonhtmlcommon::clear_breadcrumbs();
       &Apache::lonhtmlcommon::add_breadcrumb({
           'text'  => 'Construction Space',
           'href'  => &Apache::loncommon::authorspace(),
       });
       &Apache::lonhtmlcommon::add_breadcrumb({
           'text'  => 'Resource Publication',
           'href'  => '',
       });
   
     my $js='<script type="text/javascript">'.      my $js='<script type="text/javascript">'.
  &Apache::loncommon::browser_and_searcher_javascript().   &Apache::loncommon::browser_and_searcher_javascript().
  '</script>';   '</script>';
     $r->print(&Apache::loncommon::start_page('Resource Publication',$js));      $r->print(&Apache::loncommon::start_page('Resource Publication',$js)
                .&Apache::lonhtmlcommon::breadcrumbs()
                .&Apache::loncommon::head_subbox(
                     &Apache::loncommon::CSTR_pageheader()) # FIXME crumbs broken?
       );
   
   
     my $thisfn=$fn;      my $thisfn=$fn;

Removed from v.1.258.2.3  
changed lines
  Added in v.1.260


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