X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FForm.pm;h=f3fe6e5d9b49de814da4b2c0251c812a50b7b66b;hb=ef294a7520ae7e452f6671676d7a8077bf74a9cf;hp=707540ed7928358ef2fc072e280ddc3de8c667f0;hpb=38e7a330463acef3f5856985353faba026ecf7f9;p=kivitendo-erp.git diff --git a/SL/Form.pm b/SL/Form.pm index 707540ed7..f3fe6e5d9 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -56,7 +56,7 @@ use SL::User; use Template; use URI; use List::Util qw(first max min sum); -use List::MoreUtils qw(any); +use List::MoreUtils qw(any apply); use strict; @@ -265,7 +265,11 @@ sub new { $self->{action} = lc $self->{action}; $self->{action} =~ s/( |-|,|\#)/_/g; - $self->{version} = "2.6.1"; + #$self->{version} = "2.6.1"; # Old hardcoded but secure style + open VERSION_FILE, "VERSION"; # New but flexible code reads version from VERSION-file + $self->{version} = ; + close VERSION_FILE; + $self->{version} =~ s/[^0-9A-Za-z\.\_\-]//g; # only allow numbers, letters, points, underscores and dashes. Prevents injecting of malicious code. $main::lxdebug->leave_sub(); @@ -471,13 +475,16 @@ sub info { print qq|

$msg

- + - + |; @@ -665,6 +672,20 @@ sub header { | if $self->{"fokus"}; + # if there is a title, we put some JavaScript in to the page, wich writes a + # meaningful title-tag for our frameset. + my $title_hack; + if ($self->{"title"}){ + $title_hack = qq| + + |; + } + #Set Calendar my $jsscript = ""; if ($self->{jsscript} == 1) { @@ -700,13 +721,12 @@ sub header { $favicon $jsscript $ajax - $fokus + $title_hack -