From: Sven Schöling Date: Mon, 2 Oct 2017 09:31:34 +0000 (+0200) Subject: Form: version nicht mehr in $::form cachen X-Git-Tag: release-3.5.4~589 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=d90b14b107fc7859eb0b197208276919ded2079d;p=kivitendo-erp.git Form: version nicht mehr in $::form cachen --- 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')) %]