Diff for /loncom/publisher/lonupload.pm between versions 1.35 and 1.36

version 1.35, 2007/05/02 01:34:23 version 1.36, 2008/01/15 16:04:38
Line 158  sub phasetwo { Line 158  sub phasetwo {
  &Debug($r, "URL is now ".$url);   &Debug($r, "URL is now ".$url);
  my $datatoken=$env{'form.datatoken'};   my $datatoken=$env{'form.datatoken'};
  if (($fn) && ($datatoken)) {   if (($fn) && ($datatoken)) {
     if ((-e $target) && ($env{'form.override'} ne 'Yes')) {              if ($env{'form.cancel'}) {
                   my $source=$r->dir_config('lonDaemons').'/tmp/'.$datatoken.'.tmp';
                   my $dirpath=$path.'/';
                   $dirpath=~s/\/+/\//g;
                   $r->print(&mt('Upload cancelled.').'<br /><font size="+2"><a href="'.$dirpath.'">'.
                             &mt('Back to Directory').'</a></font>');
       } elsif ((-e $target) && (!$env{'form.override'})) {
  $r->print('<form action="'.$action.'" method="post">'.   $r->print('<form action="'.$action.'" method="post">'.
   &mt('File').' <span class="LC_filename">'.$fn.'</span> '.    &mt('File [_1] exists. Overwrite?','<span class="LC_filename">'.$fn.'</span>').
   &mt('exists. Overwrite?').' '.  
   '<input type="hidden" name="phase" value="two" />'.    '<input type="hidden" name="phase" value="two" />'.
   '<input type="hidden" name="filename" value="'."$url".'" />'.    '<input type="hidden" name="filename" value="'."$url".'" />'.
   '<input type="hidden" name="datatoken" value="'.$datatoken.'" />'.    '<input type="hidden" name="datatoken" value="'.$datatoken.'" />'.
   '<input type="submit" name="override" value="'.&mt('Yes').'" /></form>');    '<input type="submit" name="override" value="'.&mt('Yes').'" />'.
     } else {                            '<input type="submit" name="cancel" value="'.&mt('Cancel').'" />'.
                             '</form>');
               } else {
  my $source=$r->dir_config('lonDaemons').'/tmp/'.$datatoken.'.tmp';   my $source=$r->dir_config('lonDaemons').'/tmp/'.$datatoken.'.tmp';
  my $dirpath=$path.'/';   my $dirpath=$path.'/';
  $dirpath=~s/\/+/\//g;   $dirpath=~s/\/+/\//g;

Removed from v.1.35  
changed lines
  Added in v.1.36


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