Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 6f70e840

Von Sven Schöling vor mehr als 8 Jahren hinzugefügt

  • ID 6f70e84036bcb3dcf1eee43e0d46f27529d4d733
  • Vorgänger 948ad06a
  • Nachfolger 1aa3ce07

Form: globals nicht mehr beim Drucken in Form ablegen

Unterschiede anzeigen:

SL/Form.pm
586 586
  $::lxdebug->leave_sub;
587 587
}
588 588

  
589
sub prepare_global_vars {
590
  my ($self) = @_;
591

  
592
  $self->{AUTH}            = $::auth;
593
  $self->{INSTANCE_CONF}   = $::instance_conf;
594
  $self->{LOCALE}          = $::locale;
595
  $self->{LXCONFIG}        = $::lx_office_conf;
596
  $self->{LXDEBUG}         = $::lxdebug;
597
  $self->{MYCONFIG}        = \%::myconfig;
598
}
599

  
600 589
sub _prepare_html_template {
601 590
  $main::lxdebug->enter_sub();
602 591

  
SL/Template/LaTeX.pm
448 448
      $contents = "[% TAGS $self->{tag_start} $self->{tag_end} %]\n" . $contents;
449 449
    }
450 450

  
451
    $form->prepare_global_vars;
451
    my $globals = global_vars();
452 452

  
453
    $::form->init_template->process(\$contents, $form, \$new_contents) || die $::form->template->error;
453
    $::form->init_template->process(\$contents, { %$form, %$globals }, \$new_contents) || die $::form->template->error;
454 454
  } else {
455 455
    $new_contents = $self->parse_block($contents);
456 456
  }
......
637 637
  return (file_name => do { $tex_file_name =~ s/tex$/pdf/; $tex_file_name });
638 638
}
639 639

  
640
sub global_vars {
641
  {
642
    AUTH            => $::auth,
643
    INSTANCE_CONF   => $::instance_conf,
644
    LOCALE          => $::locale,
645
    LXCONFIG        => $::lx_office_conf,
646
    LXDEBUG         => $::lxdebug,
647
    MYCONFIG        => \%::myconfig,
648
  };
649
}
650

  
640 651
1;

Auch abrufbar als: Unified diff