: 'text/plain; charset="utf-8"',
}
);
- unless( sendmail(%mail) ) {
+ unless( Mail::Sendmail::sendmail(%mail) ) {
carp $Mail::Sendmail::error;
return { error => $Mail::Sendmail::error };
}
if C4::Context->preference("ClaimsBccCopy");
}
- unless ( sendmail(%mail) ) {
+ unless ( Mail::Sendmail::sendmail(%mail) ) {
carp $Mail::Sendmail::error;
return { error => $Mail::Sendmail::error };
}
: 'text/plain; charset="utf-8"',
}
);
- unless( sendmail(%mail) ) {
+ unless( Mail::Sendmail::sendmail(%mail) ) {
carp $Mail::Sendmail::error;
return { error => $Mail::Sendmail::error };
}
_update_message_to_address($message->{'message_id'},$to_address) unless $message->{to_address}; #if initial message address was empty, coming here means that a to address was found and queue should be updated
- if ( sendmail( %sendmail_params ) ) {
+ if ( Mail::Sendmail::sendmail( %sendmail_params ) ) {
_set_message_status( { message_id => $message->{'message_id'},
status => 'sent' } );
return 1;
my $tt_params = { %{ _get_tt_params( $tables ) }, %{ _get_tt_params( $loops, 'is_a_loop' ) }, %$substitute };
- $content = qq|[% USE KohaDates %]$content|;
+ $content = add_tt_filters( $content );
+ $content = qq|[% USE KohaDates %][% USE Remove_MARC_punctuation %]$content|;
my $output;
$template->process( \$content, $tt_params, \$output ) || croak "ERROR PROCESSING TEMPLATE: " . $template->error();
plural => 'biblios',
pk => 'biblionumber',
},
+ biblioitems => {
+ module => 'Koha::Biblioitems',
+ singular => 'biblioitem',
+ plural => 'biblioitems',
+ pk => 'biblioitemnumber',
+ },
borrowers => {
module => 'Koha::Patrons',
singular => 'borrower',
return $params;
}
+=head3 add_tt_filters
+
+$content = add_tt_filters( $content );
+
+Add TT filters to some specific fields if needed.
+
+For now we only add the Remove_MARC_punctuation TT filter to biblio and biblioitem fields
+
+=cut
+
+sub add_tt_filters {
+ my ( $content ) = @_;
+ $content =~ s|\[%\s*biblio\.(.*?)\s*%\]|[% biblio.$1 \| \$Remove_MARC_punctuation %]|gxms;
+ $content =~ s|\[%\s*biblioitem\.(.*?)\s*%\]|[% biblioitem.$1 \| \$Remove_MARC_punctuation %]|gxms;
+ return $content;
+}
+
=head2 get_item_content
my $item = Koha::Items->find(...)->unblessed;