X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FFile.pm;h=830559460898609c55e3e583686f52ccfafff744;hb=d1d70f4ad540f4d57d1b577b337b6db38074e223;hp=329697474cee79472b4b9c7660ed88bf29969e4b;hpb=48baa5ebf4441c31d45d0111a0fe8b88d10a4dcd;p=kivitendo-erp.git diff --git a/SL/File.pm b/SL/File.pm index 329697474..830559460 100644 --- a/SL/File.pm +++ b/SL/File.pm @@ -220,6 +220,8 @@ sub _save { title => $params{title}, description => $params{description}, ); + $file->itime($params{mtime}) if $params{mtime}; + $params{itime} = $params{mtime} if $params{mtime}; } } else { $exists = 1; @@ -236,12 +238,14 @@ sub _save { # load itime for new file $file->save->load; } - $main::lxdebug->message(LXDebug->DEBUG2(), "backend3=" .$file->backend); + + $file->mtime(DateTime->now_local) unless $params{mtime}; + $file->mtime($params{mtime} ) if $params{mtime}; + my $backend = $self->_get_backend($file->backend); $params{dbfile} = $file; $backend->save(%params); - $file->mtime(DateTime->now_local); $file->save; #ShopImage if($file->object_type eq "shop_image"){