Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0e7795f3

Von Moritz Bunkus vor fast 13 Jahren hinzugefügt

  • ID 0e7795f35b2e3f839001a9fdb7e21f4dd4f2f84e
  • Vorgänger 8b6ad9a4
  • Nachfolger 677f9c72

$::form-Variablen in Druckbefehlen verfügbar machen

Fix für Bugs 1740 und 1761.

Unterschiede anzeigen:

SL/Form.pm
1114 1114
  }
1115 1115

  
1116 1116
  my $result;
1117
  my $command_formatter = sub {
1118
    my ($out_mode, $out) = @_;
1119
    return $out_mode eq '|-' ? SL::Template::create(type => 'ShellCommand', form => $self)->parse($out) : $out;
1120
  };
1117 1121

  
1118 1122
  if ($self->{OUT}) {
1123
    $self->{OUT} = $command_formatter->($self->{OUT_MODE}, $self->{OUT});
1119 1124
    open(OUT, $self->{OUT_MODE}, $self->{OUT}) or $self->error("error on opening $self->{OUT} with mode $self->{OUT_MODE} : $!");
1120 1125
  } else {
1121 1126
    *OUT = ($::dispatcher->get_standard_filehandles)[1];
......
1200 1205
      #print(STDERR "OUT $self->{OUT}\n");
1201 1206
      for my $i (1 .. $self->{copies}) {
1202 1207
        if ($self->{OUT}) {
1208
          $self->{OUT} = $command_formatter->($self->{OUT_MODE}, $self->{OUT});
1209

  
1203 1210
          open  OUT, $self->{OUT_MODE}, $self->{OUT} or $self->error($self->cleanup . "$self->{OUT} : $!");
1204 1211
          print OUT $_ while <IN>;
1205 1212
          close OUT;

Auch abrufbar als: Unified diff