Diff for /loncom/publisher/loncfile.pm between versions 1.64 and 1.66

version 1.64, 2004/12/28 21:28:49 version 1.66, 2005/04/07 04:46:36
Line 802  sub phaseone { Line 802  sub phaseone {
       $ENV{'form.action'} eq 'newsequencefile' ||        $ENV{'form.action'} eq 'newsequencefile' ||
       $ENV{'form.action'} eq 'newrightsfile' ||        $ENV{'form.action'} eq 'newrightsfile' ||
       $ENV{'form.action'} eq 'newstyfile' ||        $ENV{'form.action'} eq 'newstyfile' ||
                 $ENV{'form.action'} eq 'newlibraryfile' ||
       $ENV{'form.action'} eq 'Select Action') {        $ENV{'form.action'} eq 'Select Action') {
  if ($newfilename) {          my $empty=&mt('Type Name Here');
    if (($newfilename!~/\/$/) && ($newfilename!~/$empty$/)) {
     &NewFile1($r, $uname, $udom, $fn, $newfilename);      &NewFile1($r, $uname, $udom, $fn, $newfilename);
  } else {   } else {
     $r->print('<p>'.&mt('No new filename specified.').'</p></form>');      $r->print('<p>'.&mt('No new filename specified.').'</p></form>');
Line 1109  sub phasetwo { Line 1111  sub phasetwo {
  $main=$2; # Filename.   $main=$2; # Filename.
     }      }
     if($main=~m:\.(\w+)$:){ # Fixes problems with filenames with no extensions      if($main=~m:\.(\w+)$:){ # Fixes problems with filenames with no extensions
  $main=$`; #This is what is before the match (.) so it's just the main filename, yea it's nasty   $main=~s/\.\w+$//; #strip the extension
  $suffix=$1; #This is the actually filename extension if it exists   $suffix=$1; #This is the actually filename extension if it exists
     }      }
     my $dest;                   # On success this is where we'll go.      my $dest;                   # On success this is where we'll go.
Line 1125  sub phasetwo { Line 1127  sub phasetwo {
           
     # Select the appropriate processing sub.      # Select the appropriate processing sub.
     if ($ENV{'form.action'} eq 'decompress') {       if ($ENV{'form.action'} eq 'decompress') { 
  $main .= '.';   $main .= '.'.$suffix;
  $main .= $suffix;  
  if(!&decompress2($r, $uname, $dir, $main)) {   if(!&decompress2($r, $uname, $dir, $main)) {
     return ;      return ;
  }   }
Line 1286  function writeDone() { Line 1287  function writeDone() {
      $ENV{'form.action'} eq 'newsequencefile' ||       $ENV{'form.action'} eq 'newsequencefile' ||
      $ENV{'form.action'} eq 'newrightsfile' ||       $ENV{'form.action'} eq 'newrightsfile' ||
      $ENV{'form.action'} eq 'newstyfile' ||       $ENV{'form.action'} eq 'newstyfile' ||
                $ENV{'form.action'} eq 'newlibraryfile' ||
      $ENV{'form.action'} eq 'Select Action' ) {       $ENV{'form.action'} eq 'Select Action' ) {
  $r->print('<h3>'.&mt('New Resource').'</h3>');   $r->print('<h3>'.&mt('New Resource').'</h3>');
     } else {      } else {

Removed from v.1.64  
changed lines
  Added in v.1.66


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