Diff for /loncom/publisher/loncfile.pm between versions 1.88 and 1.91

version 1.88, 2008/03/12 02:46:38 version 1.91, 2008/12/19 14:01:16
Line 109  sub Debug { Line 109  sub Debug {
     }      }
 }  }
   
   sub done {
      my ($url)=@_;
      my $done=&mt("Done");
      return(<<ENDDONE);
   <a href="$url">$done</a>
   <script type="text/javascript">
   location.href="$url";
   </script>
   ENDDONE
   }
   
 =pod  =pod
   
 =item URLToPath($url)  =item URLToPath($url)
Line 148  sub URLToPath { Line 159  sub URLToPath {
     my $Url = shift;      my $Url = shift;
     &Debug($r, "UrlToPath got: $Url");      &Debug($r, "UrlToPath got: $Url");
     $Url=~ s/\/+/\//g;      $Url=~ s/\/+/\//g;
     $Url=~ s/^http\:\/\/[^\/]+//;      $Url=~ s/^https?\:\/\/[^\/]+//;
     $Url=~ s/^\///;      $Url=~ s/^\///;
     $Url=~ s/(\~|priv\/)($match_username)\//\/home\/$2\/public_html\//;      $Url=~ s/(\~|priv\/)($match_username)\//\/home\/$2\/public_html\//;
     &Debug($r, "Returning $Url \n");      &Debug($r, "Returning $Url \n");
Line 435  Parameters: Line 446  Parameters:
   
 sub CloseForm2 {  sub CloseForm2 {
     my ($request, $user, $fn) = @_;      my ($request, $user, $fn) = @_;
     $request->print('<h3><a href="'.&url($fn).'/">'.&mt('Done').'</a></h3>');      $request->print(&done(&url($fn)));
 }  }
   
 =pod  =pod
Line 1256  sub phasetwo { Line 1267  sub phasetwo {
             $r->print('<h3><a href="'.&url($dest).'">'.&mt('Return to Directory').'</a></h3>');              $r->print('<h3><a href="'.&url($dest).'">'.&mt('Return to Directory').'</a></h3>');
             $r->print('<h3><a href="'.&url($dest_newname).'">'.$disp_newname.'</a></h3>');              $r->print('<h3><a href="'.&url($dest_newname).'">'.$disp_newname.'</a></h3>');
         } else {          } else {
     $r->print('<h3><a href="'.&url($dest).'">'.&mt('Done').'</a></h3>');      $r->print(&done(&url($dest)));
  }   }
     }      }
 }  }
Line 1330  sub handler { Line 1341  sub handler {
  $js = qq|   $js = qq|
 <script type="text/javascript">  <script type="text/javascript">
 function writeDone() {  function writeDone() {
     var winName = window.opener  
     window.focus();      window.focus();
     winName.document.dataForm.newdir.value = "$newdirname"      opener.document.info.newdir.value = "$newdirname";
     setTimeout("self.close()",10000)      setTimeout("self.close()",10000);
 }  }
   </script>    </script>
 |;  |;

Removed from v.1.88  
changed lines
  Added in v.1.91


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