]> wagnertech.de Git - mfinanz.git/blobdiff - SL/File/Backend/Webdav.pm
copy_file_to_webdav_folder: Übergebenen Anhang-Name berücksichtigen
[mfinanz.git] / SL / File / Backend / Webdav.pm
index 08df7650af74878ac93796c1e862913b03ea48b0..b1e48edf9ecb8aeee40c4719e79bf53f46275927 100644 (file)
@@ -73,7 +73,7 @@ sub get_mtime {
   die "no dbfile" unless $params{dbfile};
   $main::lxdebug->message(LXDebug->DEBUG2(), "version=" .$params{version});
   my ($path, undef, undef) = $self->webdav_path($params{dbfile});
-  die "no file found in backend" if !-f $path;
+  die "No file found in Backend: " . $path unless -f $path;
   my @st = stat($path);
   my $dt = DateTime->from_epoch(epoch => $st[9])->clone();
   $main::lxdebug->message(LXDebug->DEBUG2(), "dt=" .$dt);
@@ -84,7 +84,7 @@ sub get_filepath {
   my ($self, %params) = @_;
   die "no dbfile" unless $params{dbfile};
   my ($path, undef, undef) = $self->webdav_path($params{dbfile});
-  die "no file" if !-f $path;
+  die "No file found in Backend: " . $path unless -f $path;
   return $path;
 }
 
@@ -105,8 +105,7 @@ sub sync_from_backend {
 }
 
 sub enabled {
-  return 0 unless $::instance_conf->get_doc_webdav;
-  return 1;
+  return $::instance_conf->get_doc_webdav;
 }
 
 #
@@ -167,7 +166,7 @@ my %model_to_number = (
   GLTransaction   => 'reference',
   ShopImage       => 'partnumber',
   Customer        => 'customernumber',
-  Vendor          => 'vendor',
+  Vendor          => 'vendornumber',
 );
 
 sub webdav_path {