X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FCommon.pm;h=726c4c8e2576a04e32994be364df8357c6f5cf05;hb=38902b24ceed494a2936edfe4d72e8c48e15bce0;hp=dae75322f3f76717ca965cf4f2803e26068288fd;hpb=6e56204df612176aa0300243483746f1b04c0a7c;p=kivitendo-erp.git diff --git a/SL/Common.pm b/SL/Common.pm index dae75322f..726c4c8e2 100644 --- a/SL/Common.pm +++ b/SL/Common.pm @@ -43,7 +43,7 @@ sub unique_id { } sub tmpname { - return "/tmp/lx-office-tmp-" . unique_id(); + return "/tmp/kivitendo-tmp-" . unique_id(); } sub retrieve_parts { @@ -372,9 +372,8 @@ sub webdav_folder { mkdir_with_parents($path); } else { - my $base_path = substr($ENV{'SCRIPT_NAME'}, 1); + my $base_path = $ENV{'SCRIPT_NAME'}; $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. if (opendir my $dir, $path) { foreach my $file (sort { lc $a cmp lc $b } readdir $dir) { @@ -390,7 +389,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'), }; } @@ -497,8 +496,8 @@ sub save_email_status { $intnotes .= "\n\n" if ($intnotes); - my $cc = $main::locale->text('Cc') . ": $form->{cc}\n" if $form->{cc}; - my $bcc = $main::locale->text('Bcc') . ": $form->{bcc}\n" if $form->{bcc}; + my $cc = $form->{cc} ? $main::locale->text('Cc') . ": $form->{cc}\n" : ''; + my $bcc = $form->{bcc} ? $main::locale->text('Bcc') . ": $form->{bcc}\n" : ''; my $now = scalar localtime; $intnotes .= $main::locale->text('[email]') . "\n"