--- loncom/publisher/loncfile.pm 2001/06/23 20:09:06 1.3 +++ loncom/publisher/loncfile.pm 2001/06/24 01:40:14 1.4 @@ -52,7 +52,9 @@ sub phaseone { $r->print( '
Warning: target file exists!'); } - $r->print('
Rename '.$fn.' to '. + $r->print('
Rename '.$fn.' to '. $dir.'/'.$ENV{'form.newfilename'}.'?'); } else { $r->print('
No new filename specified.'); @@ -82,7 +84,9 @@ sub phaseone { $r->print( '
Warning: target file exists!'); } - $r->print('
Copy '.$fn.' to '. + $r->print('
Copy '.$fn.' to '. $dir.'/'.$ENV{'form.newfilename'}.'?'); } else { $r->print('
No new filename specified.'); @@ -93,10 +97,16 @@ sub phaseone { return; } } elsif ($ENV{'form.action'} eq 'newdir') { - if (-e $conspace) { + my $newdir='/home/'.$uname.'/public_html/'. + $fn.$ENV{'form.newfilename'}; + if (-e $newdir) { $r->print('
Directory exists.'); return; } + $r->print('
Make new directory '. + $fn.$ENV{'form.newfilename'}.'?'); } $r->print('
'); @@ -104,11 +114,7 @@ sub phaseone { sub phasetwo { my ($r,$fn,$uname,$udom)=@_; - if ($ENV{'form.action'} eq 'rename') { - } elsif ($ENV{'form.action'} eq 'delete') { - } elsif ($ENV{'form.action'} eq 'copy') { - } elsif ($ENV{'form.action'} eq 'newdir') { - } + $r->print('Under Construction'); } sub handler { @@ -140,7 +146,7 @@ sub handler { &Apache::loncacc::constructaccess($fn,$r->dir_config('lonDefDomain')); unless (($uname) && ($udom)) { $r->log_reason($uname.' at '.$udom. - ' trying to publish file '.$ENV{'form.filename'}. + ' trying to manipulate file '.$ENV{'form.filename'}. ' ('.$fn.') - not authorized', $r->filename); return HTTP_NOT_ACCEPTABLE; @@ -177,7 +183,7 @@ sub handler { return OK; } if ($ENV{'form.phase'} eq 'two') { -# &phasetwo($r,$fn,$uname,$udom); + &phasetwo($r,$fn,$uname,$udom); } else { &phaseone($r,$fn,$uname,$udom); }