projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kaputte Template-Deriktive wieder heile gemacht.
[kivitendo-erp.git]
/
SL
/
BackgroundJob
/
SelfTest.pm
diff --git
a/SL/BackgroundJob/SelfTest.pm
b/SL/BackgroundJob/SelfTest.pm
index
917dc0e
..
6137ced
100644
(file)
--- a/
SL/BackgroundJob/SelfTest.pm
+++ b/
SL/BackgroundJob/SelfTest.pm
@@
-11,6
+11,7
@@
use Sys::Hostname;
use FindBin;
use SL::DB::AuthUser;
use FindBin;
use SL::DB::AuthUser;
+use SL::DB::Default;
use SL::Common;
use Rose::Object::MakeMethods::Generic (
use SL::Common;
use Rose::Object::MakeMethods::Generic (
@@
-37,6
+38,7
@@
sub setup {
$self->config($::lx_office_conf{self_test} || {});
$self->tester(Test::Builder->new);
$self->config($::lx_office_conf{self_test} || {});
$self->tester(Test::Builder->new);
+ $self->tester->reset; # stupid Test::Builder mplementation uses class variables
$self->aggreg(TAP::Parser::Aggregator->new);
$self->modules(split /\s+/, $self->config->{modules});
$self->aggreg(TAP::Parser::Aggregator->new);
$self->modules(split /\s+/, $self->config->{modules});
@@
-122,7
+124,7
@@
sub _send_email {
my ($output, $content_type) = $self->_prepare_report;
my ($output, $content_type) = $self->_prepare_report;
- my $mail = Mailer->new
(charset => $::locale->is_utf8 ? 'UTF-8' : Common->DEFAULT_CHARSET )
;
+ my $mail = Mailer->new;
$mail->{from} = $self->config->{email_from};
$mail->{to} = $email;
$mail->{subject} = $self->config->{email_subject};
$mail->{from} = $self->config->{email_from};
$mail->{to} = $email;
$mail->{subject} = $self->config->{email_subject};
@@
-144,7
+146,7
@@
sub _prepare_report {
return unless $template;
my $email_template = $self->config->{email_template};
return unless $template;
my $email_template = $self->config->{email_template};
- my $filename = $email_template || ( (
$user->get_config_value('templates')
|| "templates/mails") . "/self_test/status_mail.txt" );
+ my $filename = $email_template || ( (
SL::DB::Default->get->templates
|| "templates/mails") . "/self_test/status_mail.txt" );
my $content_type = $filename =~ m/.html$/ ? 'text/html' : 'text/plain';
my $content_type = $filename =~ m/.html$/ ? 'text/html' : 'text/plain';