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