Diff for /loncom/interface/londocs.pm between versions 1.484.2.53 and 1.484.2.54

version 1.484.2.53, 2014/06/16 05:32:45 version 1.484.2.54, 2014/08/25 01:43:51
Line 5459  sub decompression_info { Line 5459  sub decompression_info {
     my $docuname=$env{'course.'.$env{'request.course.id'}.'.num'};      my $docuname=$env{'course.'.$env{'request.course.id'}.'.num'};
     my $container='sequence';      my $container='sequence';
     my ($pathitem,$hiddenelem);      my ($pathitem,$hiddenelem);
     my @hiddens = ('newidx','comment','position','folderpath');      my @hiddens = ('newidx','comment','position','folderpath','archiveurl');
     if ($env{'form.folderpath'} =~ /\:1$/) {      if ($env{'form.folderpath'} =~ /\:1$/) {
         $container='page';          $container='page';
     }      }
Line 5467  sub decompression_info { Line 5467  sub decompression_info {
     foreach my $item (@hiddens) {      foreach my $item (@hiddens) {
         if ($env{'form.'.$item}) {          if ($env{'form.'.$item}) {
             $hiddenelem .= '<input type="hidden" name="'.$item.'" value="'.              $hiddenelem .= '<input type="hidden" name="'.$item.'" value="'.
                            $env{'form.'.$item}.'" />'."\n";                             &HTML::Entities::encode($env{'form.'.$item},'<>&"').'" />'."\n";
         }          }
     }      }
     return ($destination,$dir_root,$londocroot,$docudom,$docuname,$container,      return ($destination,$dir_root,$londocroot,$docudom,$docuname,$container,
Line 5524  sub remove_archive { Line 5524  sub remove_archive {
         } else {          } else {
             $delwarning = &mt('An error occurred retrieving the contents of the current folder.');              $delwarning = &mt('An error occurred retrieving the contents of the current folder.');
         }          }
         $delwarning .= &mt('As a result the archive file has not been removed.');          $delwarning .= ' '.&mt('As a result the archive file has not been removed.');
     } else {      } else {
         my $currcmd = $env{'form.cmd'};          my $currcmd = $env{'form.cmd'};
         my $position = $env{'form.position'};          my $position = $env{'form.position'};
         if ($position > 0) {           my $archiveidx = $position;
             $env{'form.cmd'} = 'remove_'.$position;          if ($position > 0) {
             my ($title,$url,@rrest) =               if (($env{'form.autoextract_camtasia'}) && (scalar(@LONCAPA::map::order) == 2)) {
                 split(/:/,$LONCAPA::map::resources[$LONCAPA::map::order[$position]]);                  $archiveidx = $position-1;
             if (&handle_edit_cmd($docuname,$docudom)) {              }
                 ($errtext,$fatal) = &storemap($docuname,$docudom,$map,1);              $env{'form.cmd'} = 'remove_'.$archiveidx;
                 if ($fatal) {              my ($title,$url,@rrest) =
                     if ($container eq 'page') {                  split(/:/,$LONCAPA::map::resources[$LONCAPA::map::order[$archiveidx]]);
                         $delwarning = &mt('An error occurred updating the contents of the current page.');              if ($url eq $env{'form.archiveurl'}) {
                   if (&handle_edit_cmd($docuname,$docudom)) {
                       ($errtext,$fatal) = &storemap($docuname,$docudom,$map,1);
                       if ($fatal) {
                           if ($container eq 'page') {
                               $delwarning = &mt('An error occurred updating the contents of the current page.');
                           } else {
                               $delwarning = &mt('An error occurred updating the contents of the current folder.');
                           }
                     } else {                      } else {
                         $delwarning = &mt('An error occurred updating the contents of the current folder.');                          $delresult = &mt('Archive file removed.');
                     }                      }
                 } else {  
                     $delresult = &mt('Archive file removed.');  
                 }                  }
               } else {
                   $delwarning .=  &mt('Archive file had unexpected item number in folder.').
                                   ' '.&mt('As a result the archive file has not been removed.');
             }              }
         }          }
         $env{'form.cmd'} = $currcmd;          $env{'form.cmd'} = $currcmd;

Removed from v.1.484.2.53  
changed lines
  Added in v.1.484.2.54


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