|
Lines 702-713
sub GetPreparedLetter {
Link Here
|
| 702 |
return; |
702 |
return; |
| 703 |
} |
703 |
} |
| 704 |
|
704 |
|
|
|
705 |
my $objects = $params{objects} || {}; |
| 705 |
my $tables = $params{tables} || {}; |
706 |
my $tables = $params{tables} || {}; |
| 706 |
my $substitute = $params{substitute} || {}; |
707 |
my $substitute = $params{substitute} || {}; |
| 707 |
my $loops = $params{loops} || {}; # loops is not supported for historical notices syntax |
708 |
my $loops = $params{loops} || {}; # loops is not supported for historical notices syntax |
| 708 |
my $repeat = $params{repeat}; |
709 |
my $repeat = $params{repeat}; |
| 709 |
%$tables || %$substitute || $repeat || %$loops |
710 |
%$tables || %$substitute || $repeat || %$loops || %$objects |
| 710 |
or carp( "ERROR: nothing to substitute - both 'tables', 'loops' and 'substitute' are empty" ), |
711 |
or carp( "ERROR: nothing to substitute - all of 'objects', 'tables', 'loops' and 'substitute' are empty" ), |
| 711 |
return; |
712 |
return; |
| 712 |
my $want_librarian = $params{want_librarian}; |
713 |
my $want_librarian = $params{want_librarian}; |
| 713 |
|
714 |
|
|
Lines 782-791
sub GetPreparedLetter {
Link Here
|
| 782 |
|
783 |
|
| 783 |
$letter->{content} = _process_tt( |
784 |
$letter->{content} = _process_tt( |
| 784 |
{ |
785 |
{ |
| 785 |
content => $letter->{content}, |
786 |
content => $letter->{content}, |
| 786 |
tables => $tables, |
787 |
tables => $tables, |
| 787 |
loops => $loops, |
788 |
loops => $loops, |
| 788 |
substitute => $substitute, |
789 |
substitute => $substitute, |
|
|
790 |
objects => $objects, |
| 789 |
} |
791 |
} |
| 790 |
); |
792 |
); |
| 791 |
|
793 |
|
|
Lines 1457-1465
sub _set_message_status {
Link Here
|
| 1457 |
sub _process_tt { |
1459 |
sub _process_tt { |
| 1458 |
my ( $params ) = @_; |
1460 |
my ( $params ) = @_; |
| 1459 |
|
1461 |
|
| 1460 |
my $content = $params->{content}; |
1462 |
my $content = $params->{content}; |
| 1461 |
my $tables = $params->{tables}; |
1463 |
my $tables = $params->{tables}; |
| 1462 |
my $loops = $params->{loops}; |
1464 |
my $loops = $params->{loops}; |
|
|
1465 |
my $objects = $params->{objects}; |
| 1463 |
my $substitute = $params->{substitute} || {}; |
1466 |
my $substitute = $params->{substitute} || {}; |
| 1464 |
|
1467 |
|
| 1465 |
my $use_template_cache = C4::Context->config('template_cache_dir') && defined $ENV{GATEWAY_INTERFACE}; |
1468 |
my $use_template_cache = C4::Context->config('template_cache_dir') && defined $ENV{GATEWAY_INTERFACE}; |
|
Lines 1475-1481
sub _process_tt {
Link Here
|
| 1475 |
} |
1478 |
} |
| 1476 |
) or die Template->error(); |
1479 |
) or die Template->error(); |
| 1477 |
|
1480 |
|
| 1478 |
my $tt_params = { %{ _get_tt_params( $tables ) }, %{ _get_tt_params( $loops, 'is_a_loop' ) }, %$substitute }; |
1481 |
my $tt_params = { %{ _get_tt_params( $tables ) }, %{ _get_tt_params( $loops, 'is_a_loop' ) }, %$substitute, %$objects }; |
| 1479 |
|
1482 |
|
| 1480 |
$content = qq|[% USE KohaDates %]$content|; |
1483 |
$content = qq|[% USE KohaDates %]$content|; |
| 1481 |
|
1484 |
|