version 1.111, 2011/10/24 22:39:21
|
version 1.112, 2011/10/30 19:27:27
|
Line 188 sub display {
|
Line 188 sub display {
|
|
|
sub obsolete_unpub { |
sub obsolete_unpub { |
my ($user,$domain,$construct)=@_; |
my ($user,$domain,$construct)=@_; |
|
my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'}; |
my $published=$construct; |
my $published=$construct; |
$published=~s/^\/home\/httpd\/html\/priv\//\/home\/httpd\/html\/res\//; |
$published=~s{^\Q$londocroot/priv/\E}{$londocroot/res/}; |
if (-e $published) { |
if (-e $published) { |
if (&Apache::lonnet::metadata($published,'obsolete')) { |
if (&Apache::lonnet::metadata($published,'obsolete')) { |
return 1; |
return 1; |
Line 270 sub exists {
|
Line 271 sub exists {
|
my ($user, $domain, $construct, $creating) = @_; |
my ($user, $domain, $construct, $creating) = @_; |
$creating ||= 'file'; |
$creating ||= 'file'; |
|
|
|
my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'}; |
my $published=$construct; |
my $published=$construct; |
$published=~s{^/home/httpd/html/priv/}{/home/httpd/html/res/}; |
$published=~s{^\Q$londocroot/priv/\E}{$londocroot/res/}; |
my ($type,$result); |
my ($type,$result); |
if ( -d $construct ) { |
if ( -d $construct ) { |
return ('error','<p><span class="LC_error">'.&mt('Error: destination for operation is an existing directory.').'</span></p>'); |
return ('error','<p><span class="LC_error">'.&mt('Error: destination for operation is an existing directory.').'</span></p>'); |