X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/29795499e0623f7ff7ea739ed3b61d66dad0e7c6..b36ceb76a5231513f385ba52cb29afddee674016:/SL/Form.pm diff --git a/SL/Form.pm b/SL/Form.pm index 2236a94ee..a926b3cdd 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -380,6 +380,12 @@ sub header { my ($stylesheet, $favicon); if ($ENV{HTTP_USER_AGENT}) { + my $doctype; + + if ($ENV{'HTTP_USER_AGENT'} =~ m/MSIE\s+\d/) { + # Only set the DOCTYPE for Internet Explorer. Other browsers have problems displaying the menu otherwise. + $doctype = qq|\n|; + } my $stylesheets = "$self->{stylesheet} $self->{stylesheets}"; @@ -433,8 +439,7 @@ sub header { } print qq|Content-Type: text/html; charset=${db_charset}; - - +${doctype} $self->{titlebar} $stylesheet @@ -586,6 +591,7 @@ sub parse_html_template2 { 'EVAL_PERL' => 0, 'ABSOLUTE' => 1, 'CACHE_SIZE' => 0, + 'PLUGIN_BASE' => 'SL::Template::Plugin', }) || die; map { $additional_params->{$_} ||= $self->{$_} } keys %{ $self }; @@ -1865,11 +1871,12 @@ $main::lxdebug->enter_sub(); sub _get_customers { $main::lxdebug->enter_sub(); - my ($self, $dbh, $key) = @_; + my ($self, $dbh, $key, $limit) = @_; $key = "all_customers" unless ($key); + $limit_clause = "LIMIT $limit" if $limit; - my $query = qq|SELECT * FROM customer WHERE NOT obsolete ORDER BY name|; + my $query = qq|SELECT * FROM customer WHERE NOT obsolete ORDER BY name $limit_clause|; $self->{$key} = selectall_hashref_query($self, $dbh, $query); @@ -1985,11 +1992,19 @@ sub get_lists { } if($params{"customers"}) { - $self->_get_customers($dbh, $params{"customers"}); + if (ref $params{"customers"} eq 'HASH') { + $self->_get_customers($dbh, $params{"customers"}{key}, $params{"customers"}{limit}); + } else { + $self->_get_customers($dbh, $params{"customers"}); + } } if($params{"vendors"}) { - $self->_get_vendors($dbh, $params{"vendors"}); + if (ref $params{"vendors"} eq 'HASH') { + $self->_get_vendors($dbh, $params{"vendors"}{key}, $params{"vendors"}{limit}); + } else { + $self->_get_vendors($dbh, $params{"vendors"}); + } } if($params{"payments"}) {