From d90b14b107fc7859eb0b197208276919ded2079d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 2 Oct 2017 11:31:34 +0200 Subject: [PATCH] Form: version nicht mehr in $::form cachen --- SL/Form.pm | 10 ++++------ SL/Mailer.pm | 5 +++-- templates/webpages/login/company_logo.html | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/SL/Form.pm b/SL/Form.pm index 48a03887d..43a3a39cb 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -110,8 +110,6 @@ sub new { bless $self, $type; - $self->{version} = $self->read_version; - $main::lxdebug->leave_sub(); return $self; @@ -183,7 +181,7 @@ sub flatten_standard_variables { $main::lxdebug->enter_sub(2); my $self = shift; - my %skip_keys = map { $_ => 1 } (qw(login password header stylesheet titlebar version), @_); + my %skip_keys = map { $_ => 1 } (qw(login password header stylesheet titlebar), @_); my @variables; @@ -470,7 +468,7 @@ sub header { ), "jquery/ui/i18n/jquery.ui.datepicker-$::myconfig{countrycode}"); $self->{favicon} ||= "favicon.ico"; - $self->{titlebar} = join ' - ', grep $_, $self->{title}, $self->{login}, $::myconfig{dbname}, $self->{version} if $self->{title} || !$self->{titlebar}; + $self->{titlebar} = join ' - ', grep $_, $self->{title}, $self->{login}, $::myconfig{dbname}, $self->read_version if $self->{title} || !$self->{titlebar}; # build includes if ($self->{refresh_url} || $self->{refresh_time}) { @@ -564,7 +562,7 @@ sub set_standard_title { $::lxdebug->enter_sub; my $self = shift; - $self->{titlebar} = "kivitendo " . $::locale->text('Version') . " $self->{version}"; + $self->{titlebar} = "kivitendo " . $::locale->text('Version') . " " . $self->read_version; $self->{titlebar} .= "- $::myconfig{name}" if $::myconfig{name}; $self->{titlebar} .= "- $::myconfig{dbname}" if $::myconfig{name}; @@ -1129,7 +1127,7 @@ sub send_email { my $mail = Mailer->new; map { $mail->{$_} = $self->{$_} } - qw(cc subject message version format); + qw(cc subject message format); $mail->{bcc} = $self->get_bcc_defaults($myconfig, $self->{bcc}); $mail->{to} = $self->{EMAIL_RECIPIENT} ? $self->{EMAIL_RECIPIENT} : $self->{email}; diff --git a/SL/Mailer.pm b/SL/Mailer.pm index 87b3dfc86..b7932457b 100644 --- a/SL/Mailer.pm +++ b/SL/Mailer.pm @@ -34,6 +34,7 @@ use SL::DB::EmailJournal; use SL::DB::EmailJournalAttachment; use SL::DB::Employee; use SL::Template; +use SL::Version; use strict; @@ -87,7 +88,7 @@ sub _create_message_id { $domain =~ s/.*\@//; $domain =~ s/>.*//; - return "kivitendo-$self->{version}-" . time() . "-${$}-${num_sent}\@$domain"; + return "kivitendo-" . SL::Version->get_version . "-" . time() . "-${$}-${num_sent}\@$domain"; } sub _create_address_headers { @@ -234,7 +235,7 @@ sub send { $self->{headers} = [ Subject => $self->{subject}, 'Message-ID' => '<' . $self->_create_message_id . '>', - 'X-Mailer' => "kivitendo $self->{version}", + 'X-Mailer' => "kivitendo " . SL::Version->get_version, ]; $self->{mail_attachments} = []; $self->{content_by_name} = $::instance_conf->get_email_journal == 1 && $::instance_conf->get_doc_files; diff --git a/templates/webpages/login/company_logo.html b/templates/webpages/login/company_logo.html index bfb40167a..95c6eca5f 100644 --- a/templates/webpages/login/company_logo.html +++ b/templates/webpages/login/company_logo.html @@ -9,7 +9,7 @@
- + [%- IF git_head %]

[%- LxERP.t8("Git revision: #1, #2 #3", git_head.hash.substr(0, 7), git_head.author_date.to_kivitendo, git_head.author_date.strftime('%H:%M:%S %Z')) %]

-- 2.20.1