Diff for /loncom/publisher/lonupload.pm between versions 1.18 and 1.19

version 1.18, 2003/08/04 17:45:06 version 1.19, 2003/08/04 18:22:55
Line 163  sub phasetwo { Line 163  sub phasetwo {
  '<font color=red>'.   '<font color=red>'.
  'The extension on this file is reserved internally by LON-CAPA.'.   'The extension on this file is reserved internally by LON-CAPA.'.
  '</font>');   '</font>');
                 $r->print('<p><font size=+2><a href="'.$path.
                           '">Back to Directory</a></font>');
    } elsif ($fn=~/\.(\w+)$/ &&      } elsif ($fn=~/\.(\w+)$/ && 
     !defined(&Apache::loncommon::fileembstyle($1))) {      !defined(&Apache::loncommon::fileembstyle($1))) {
        $r->print(         $r->print(
Line 170  sub phasetwo { Line 172  sub phasetwo {
  '<font color=red>'.   '<font color=red>'.
  'The extension on this file is not recognized by LON-CAPA.'.   'The extension on this file is not recognized by LON-CAPA.'.
  '</font>');   '</font>');
          $r->print('<p><font size=+2><a href="'.$path.
                           '">Back to Directory</a></font>');
      } elsif (-d $target) {
          $r->print(
    'File <tt>'.$fn.'</tt> could not be copied.<br />'.
    '<font color=red>'.
    'The target is an existing directory.'.
    '</font>');
          $r->print('<p><font size=+2><a href="'.$path.
                           '">Back to Directory</a></font>');
    } elsif (copy($source,$target)) {     } elsif (copy($source,$target)) {
        chmod(0660, $target); # Set permissions to rw-rw---.         chmod(0660, $target); # Set permissions to rw-rw---.
       $r->print('File copied.');        $r->print('File copied.');
Line 179  sub phasetwo { Line 191  sub phasetwo {
                         '">Back to Directory</a></font>');                          '">Back to Directory</a></font>');
    } else {     } else {
               $r->print('Failed to copy: '.$!);                $r->print('Failed to copy: '.$!);
                 $r->print('<p><font size=+2><a href="'.$path.
                           '">Back to Directory</a></font>');
    }     }
        }         }
     } else {      } else {
        $r->print(         $r->print(
    '<font size=+1 color=red>Please pick a filename</font><p>');     '<font size=+1 color=red>Please use browser "Back" button and pick a filename</font><p>');
        &phaseone($r,$fn,$uname,$udom);  
     }      }
   } else {    } else {
     $r->print(      $r->print(
    '<font size=+1 color=red>Please pick a filename</font><p>');     '<font size=+1 color=red>Please use browser "Back" button and pick a filename</font><p>');
     &phaseone($r,$fn,$uname,$udom);  
   }    }
 }  }
   

Removed from v.1.18  
changed lines
  Added in v.1.19


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