Diff for /loncom/interface/portfolio.pm between versions 1.27 and 1.29

version 1.27, 2004/08/24 07:26:04 version 1.29, 2004/08/24 07:35:57
Line 180  sub display_directory { Line 180  sub display_directory {
     $r->print($displayOut);      $r->print($displayOut);
     $r->print('</td></tr></table>');      $r->print('</td></tr></table>');
     my @tree = split (/\//,$current_path);      my @tree = split (/\//,$current_path);
     $r->print('<font size="+2">'.&make_anchor('/','/'));      $r->print('<font size="+2">'.&make_anchor('portfolio','/').'/');
     if (@tree > 1){      if (@tree > 1){
         my $newCurrentPath = '';          my $newCurrentPath = '';
         for (my $i = 1; $i< @tree; $i++){          for (my $i = 1; $i< @tree; $i++){
Line 345  sub upload { Line 345  sub upload {
   
 sub createdir {  sub createdir {
     my ($r)=@_;      my ($r)=@_;
     #FIXME 1) bad dirnames ( '/' etc)      #FIXME 1) file exists in place of dir (errormessage needs improvement)
     #      2) file exists in place of dir (errormessage needs improvement)      my $newdir=&Apache::lonnet::clean_filename($ENV{'form.newdir'});
       if ($newdir eq '') {
    $r->print('<font color="red">'.
     &mt("Error: no valid directory name was provided.").
     '</font><br />');
    $r->print(&done());
    return;
       } 
     my $result=&Apache::lonnet::mkdiruserfile($ENV{'user.name'},      my $result=&Apache::lonnet::mkdiruserfile($ENV{'user.name'},
      $ENV{'user.domain'},'portfolio'.$ENV{'form.currentpath'}.$ENV{'form.newdir'});       $ENV{'user.domain'},'portfolio'.$ENV{'form.currentpath'}.$newdir);
     if ($result ne 'ok') {      if ($result ne 'ok') {
  $r->print('<font color="red"> An errror occured ('.$result.   $r->print('<font color="red"> An errror occured ('.$result.
   ') while trying to create a new directory '.&display_file().'</font><br />');    ') while trying to create a new directory '.&display_file().'</font><br />');

Removed from v.1.27  
changed lines
  Added in v.1.29


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