version 1.303, 2023/07/14 22:19:22
|
version 1.304, 2024/06/01 22:25:23
|
Line 2129 sub phasetwo {
|
Line 2129 sub phasetwo {
|
|
|
# ------------------------------------------------------------- Trigger updates |
# ------------------------------------------------------------- Trigger updates |
push(@{$modified_urls},[$target,$source]); |
push(@{$modified_urls},[$target,$source]); |
unless ($registered_cleanup) { |
¬ify_in_cleanup($r); |
my $handlers = $r->get_handlers('PerlCleanupHandler'); |
|
$r->set_handlers('PerlCleanupHandler' => [\¬ify,@{$handlers}]); |
|
$registered_cleanup=1; |
|
} |
|
|
|
# ---------------------------------------------------------- Clear local caches |
# ---------------------------------------------------------- Clear local caches |
my $thisdistarget=$target; |
my $thisdistarget=$target; |
Line 2189 sub phasetwo {
|
Line 2185 sub phasetwo {
|
} |
} |
} |
} |
|
|
|
sub notify_in_cleanup { |
|
my ($r) = @_; |
|
unless ($registered_cleanup) { |
|
my $handlers = $r->get_handlers('PerlCleanupHandler'); |
|
$r->set_handlers('PerlCleanupHandler' => [\¬ify,@{$handlers}]); |
|
$registered_cleanup=1; |
|
} |
|
} |
|
|
# =============================================================== Notifications |
# =============================================================== Notifications |
sub notify { |
sub notify { |
# --------------------------------------------------- Send update notifications |
# --------------------------------------------------- Send update notifications |
Line 2350 sub publishdirectory {
|
Line 2355 sub publishdirectory {
|
my %commonaccess; |
my %commonaccess; |
map { $commonaccess{$_} = 1; } &Apache::loncommon::get_env_multiple('form.commonaccess'); |
map { $commonaccess{$_} = 1; } &Apache::loncommon::get_env_multiple('form.commonaccess'); |
unless ($lock) { $lock=&Apache::lonnet::set_lock(&mt('Publishing [_1]',$fn)); } |
unless ($lock) { $lock=&Apache::lonnet::set_lock(&mt('Publishing [_1]',$fn)); } |
|
if ($lock) { |
|
¬ify_in_cleanup($r); |
|
} |
# actually publish things |
# actually publish things |
opendir(DIR,$fn); |
opendir(DIR,$fn); |
my @files=sort(readdir(DIR)); |
my @files=sort(readdir(DIR)); |
Line 2358 sub publishdirectory {
|
Line 2366 sub publishdirectory {
|
$cuid,$cgid,$crdev,$csize, |
$cuid,$cgid,$crdev,$csize, |
$catime,$cmtime,$cctime, |
$catime,$cmtime,$cctime, |
$cblksize,$cblocks)=stat($fn.'/'.$filename); |
$cblksize,$cblocks)=stat($fn.'/'.$filename); |
|
|
my $extension=''; |
my $extension=''; |
if ($filename=~/\.(\w+)$/) { $extension=$1; } |
if ($filename=~/\.(\w+)$/) { $extension=$1; } |
if ($cmode&$dirptr) { |
if ($cmode&$dirptr) { |