version 1.260, 2009/05/28 17:08:38
|
version 1.263, 2009/11/19 05:18:08
|
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; |
unless ($srcd=~/^\/home\/httpd\/html\/res/) { |
my $docroot = $Apache::lonnet::perlvar{'lonDocRoot'}; |
|
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 1746 sub phasetwo {
|
Line 1747 sub phasetwo {
|
# ------------------------------------------------------------- Trigger updates |
# ------------------------------------------------------------- Trigger updates |
push(@{$modified_urls},[$target,$source]); |
push(@{$modified_urls},[$target,$source]); |
unless ($registered_cleanup) { |
unless ($registered_cleanup) { |
$r->register_cleanup(\¬ify); |
my $handlers = $r->get_handlers('PerlCleanupHandler'); |
|
$r->set_handlers('PerlCleanupHandler' => [\¬ify,@{$handlers}]); |
$registered_cleanup=1; |
$registered_cleanup=1; |
} |
} |
|
|
Line 1769 sub phasetwo {
|
Line 1771 sub phasetwo {
|
my $thissrcdir=$thissrc; |
my $thissrcdir=$thissrc; |
$thissrcdir=~s/\/[^\/]+$/\//; |
$thissrcdir=~s/\/[^\/]+$/\//; |
|
|
|
$r->print(&Apache::lonhtmlcommon::start_funclist()); |
|
unless ($env{'request.role'}=~/^(aa)/) { |
|
$r->print( |
|
&Apache::lonhtmlcommon::add_item_funclist( |
|
'<a href="'.$thisdistarget.'">' |
|
.&mt('View Published Version') |
|
.'</a>') |
|
); |
|
} |
$r->print( |
$r->print( |
'<hr /><a href="'.$thisdistarget.'"><font size="+2">'. |
&Apache::lonhtmlcommon::add_item_funclist( |
&mt('View Published Version').'</font></a>'. |
'<a href="'.$thissrc.'">' |
'<p><a href="'.$thissrc.'"><font size="+2">'. |
.&mt('Back to Source') |
&mt('Back to Source').'</font></a></p>'. |
.'</a>') |
'<p><a href="'.$thissrcdir. |
.&Apache::lonhtmlcommon::add_item_funclist( |
'"><font size="+2">'. |
'<a href="'.$thissrcdir.'">' |
&mt('Back to Source Directory').'</font></a></p>'); |
.&mt('Back to Source Directory') |
|
.'</a>') |
|
.&Apache::lonhtmlcommon::end_funclist() |
|
); |
} |
} |
return 1; |
return 1; |
} |
} |
Line 2282 ENDDIFF
|
Line 2295 ENDDIFF
|
} |
} |
} else { |
} else { |
&phasetwo($r,$thisfn,$thistarget,$thisembstyle,$thisdistarget); |
&phasetwo($r,$thisfn,$thistarget,$thisembstyle,$thisdistarget); |
$r->print('<hr />'); |
|
} |
} |
} |
} |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |