$cgi_params{'-charset'} = $params{charset} if ($params{charset});
$cgi_params{'-cookie'} = $session_cookie if ($session_cookie);
- map { $cgi_params{'-' . $_} = $params{$_} if exists $params{$_} } qw(content_disposition content_length);
+ map { $cgi_params{'-' . $_} = $params{$_} if exists $params{$_} } qw(content_disposition content_length status);
my $output = $cgi->header(%cgi_params);
copy(join('/', $self->{cwd}, $userspath, $self->{tmpfile}), $out =~ m|^/| ? $out : join('/', $self->{cwd}, $out)) if $template->uses_temp_file;
if ($copy_to_webdav) {
- my $error = Common::copy_file_to_webdav_folder($self);
- chdir("$self->{cwd}");
- $self->error($error) if $error;
+ if (my $error = Common::copy_file_to_webdav_folder($self)) {
+ chdir("$self->{cwd}");
+ $self->error($error);
+ }
}
if (!$self->{preview} && $self->doc_storage_enabled)
}
if ($copy_to_webdav) {
- my $error = Common::copy_file_to_webdav_folder($self);
- chdir("$self->{cwd}");
- $self->error($error) if $error;
+ if (my $error = Common::copy_file_to_webdav_folder($self)) {
+ chdir("$self->{cwd}");
+ $self->error($error);
+ }
}
if ( !$self->{preview} && $ext_for_format eq 'pdf' && $self->doc_storage_enabled) {
my @values;
foreach my $item (qw(name department_1 department_2 street zipcode city country gln
- contact cp_gender phone fax email)) {
+ contact phone fax email)) {
if ($self->{"shipto$item"}) {
$shipto = 1 if ($self->{$item} ne $self->{"shipto$item"});
}