X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FCommon.pm;h=09f9468d87a7b08170101df22e1cd3f3c8471522;hb=89c9ff022d3f13e27ba6bda085df15707fcfb0eb;hp=664bc6a08be95827a415e0b65783d89c8012880a;hpb=267cb60760ce2aba540556973b16430156342fb5;p=kivitendo-erp.git diff --git a/SL/Common.pm b/SL/Common.pm index 664bc6a08..09f9468d8 100644 --- a/SL/Common.pm +++ b/SL/Common.pm @@ -8,6 +8,9 @@ package Common; +use utf8; +use strict; + use Time::HiRes qw(gettimeofday); use Data::Dumper; @@ -15,8 +18,6 @@ use SL::DBUtils; use vars qw(@db_encodings %db_encoding_to_charset %charset_to_db_encoding); -use strict; - @db_encodings = ( { "label" => "ASCII", "dbencoding" => "SQL_ASCII", "charset" => "ASCII" }, { "label" => "UTF-8 Unicode", "dbencoding" => "UNICODE", "charset" => "UTF-8" }, @@ -286,8 +287,9 @@ sub retrieve_vendor { my $query = qq!SELECT id, name, customernumber, (street || ', ' || zipcode || city) AS address FROM customer ! . - qq!WHERE $filter business_id = (SELECT id FROM business WHERE description = 'Händler') ! . + qq!WHERE $filter business_id = (SELECT id FROM business WHERE description = ?') ! . qq!ORDER BY $order_by $order_dir!; + push @filter_values, $::locale->{iconv_utf8}->convert('Händler'); my $sth = $dbh->prepare($query); $sth->execute(@filter_values) || $form->dberror($query . " (" . join(", ", @filter_values) . ")"); @@ -334,7 +336,7 @@ sub webdav_folder { my ($form) = @_; return $main::lxdebug->leave_sub() - unless ($main::webdav && $form->{id}); + unless ($::lx_office_conf{system}->{webdav} && $form->{id}); my ($path, $number); @@ -373,7 +375,7 @@ sub webdav_folder { my $base_path = substr($ENV{'SCRIPT_NAME'}, 1); $base_path =~ s|[^/]+$||; $base_path =~ s|/$||; - # wo kommt der wert für dir her? es wird doch gar nichts übergeben? fix für strict my $dir jb 21.2. + # wo kommt der wert für dir her? es wird doch gar nichts übergeben? fix für strict my $dir jb 21.2. if (opendir my $dir, $path) { foreach my $file (sort { lc $a cmp lc $b } readdir $dir) { next if (($file eq '.') || ($file eq '..')); @@ -388,7 +390,7 @@ sub webdav_folder { push @{ $form->{WEBDAV} }, { 'name' => $fname, - 'link' => "/$base_path/$file", + 'link' => "$base_path/$file", 'type' => $is_directory ? $main::locale->text('Directory') : $main::locale->text('File'), }; }