diff --git a/products/ASC.Files/Core/Core/Dao/TeamlabDao/FileDao.cs b/products/ASC.Files/Core/Core/Dao/TeamlabDao/FileDao.cs index 3bfb962dc0f..30a9edb2854 100644 --- a/products/ASC.Files/Core/Core/Dao/TeamlabDao/FileDao.cs +++ b/products/ASC.Files/Core/Core/Dao/TeamlabDao/FileDao.cs @@ -824,7 +824,6 @@ public File CopyFile(int fileId, int toFolderId) if (file != null) { var copy = ServiceProvider.GetService>(); - copy.FileStatus = file.FileStatus; copy.FolderID = toFolderId; copy.Title = file.Title; @@ -1040,7 +1039,6 @@ private File GetFileForCommit(ChunkedUploadSession uploadSession) return file; } - var result = ServiceProvider.GetService>(); result.FolderID = uploadSession.File.FolderID; result.Title = uploadSession.File.Title; diff --git a/products/ASC.Files/Core/Core/Dao/TeamlabDao/FolderDao.cs b/products/ASC.Files/Core/Core/Dao/TeamlabDao/FolderDao.cs index 74a8962593b..3809b38ad01 100644 --- a/products/ASC.Files/Core/Core/Dao/TeamlabDao/FolderDao.cs +++ b/products/ASC.Files/Core/Core/Dao/TeamlabDao/FolderDao.cs @@ -50,7 +50,6 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Storage; - using Microsoft.Extensions.DependencyInjection; namespace ASC.Files.Core.Data diff --git a/products/ASC.Files/Core/Core/Entries/FileHelper.cs b/products/ASC.Files/Core/Core/Entries/FileHelper.cs index 4c815430f06..07700232a1e 100644 --- a/products/ASC.Files/Core/Core/Entries/FileHelper.cs +++ b/products/ASC.Files/Core/Core/Entries/FileHelper.cs @@ -71,7 +71,7 @@ internal string GetTitle(File file) : FileUtility.ReplaceFileExtension(file.PureTitle, FileUtility.GetInternalExtension(file.PureTitle)); } - internal FileStatus GetFileStatus(File file, FileStatus currentStatus) + internal FileStatus GetFileStatus(File file, ref FileStatus currentStatus) { if (FileTracker.IsEditing(file.ID)) { diff --git a/products/ASC.Files/Core/HttpHandlers/SearchHandler.cs b/products/ASC.Files/Core/HttpHandlers/SearchHandler.cs index 2f69017a93e..072cb6a981a 100644 --- a/products/ASC.Files/Core/HttpHandlers/SearchHandler.cs +++ b/products/ASC.Files/Core/HttpHandlers/SearchHandler.cs @@ -72,7 +72,6 @@ public string SearchName private FileUtility FileUtility { get; } private PathProvider PathProvider { get; } private ThirdpartyConfiguration ThirdpartyConfiguration { get; } - private IServiceProvider ServiceProvider { get; } public SearchHandler( FileSecurity fileSecurity, @@ -83,8 +82,7 @@ public SearchHandler( FilesLinkUtility filesLinkUtility, FileUtility fileUtility, PathProvider pathProvider, - ThirdpartyConfiguration thirdpartyConfiguration, - IServiceProvider serviceProvider) + ThirdpartyConfiguration thirdpartyConfiguration) { FileSecurity = fileSecurity; DaoFactory = daoFactory; @@ -95,7 +93,6 @@ public SearchHandler( FileUtility = fileUtility; PathProvider = pathProvider; ThirdpartyConfiguration = thirdpartyConfiguration; - ServiceProvider = serviceProvider; } public IEnumerable> SearchFiles(string text) diff --git a/products/ASC.Files/Core/Model/FileWrapper.cs b/products/ASC.Files/Core/Model/FileWrapper.cs index ff624d55307..4319979c127 100644 --- a/products/ASC.Files/Core/Model/FileWrapper.cs +++ b/products/ASC.Files/Core/Model/FileWrapper.cs @@ -156,8 +156,7 @@ public class FileWrapperHelper : FileEntryWrapperHelper private GlobalFolderHelper GlobalFolderHelper { get; } private CommonLinkUtility CommonLinkUtility { get; } private FilesLinkUtility FilesLinkUtility { get; } - private FileUtility FileUtility { get; } - private IServiceProvider ServiceProvider { get; } + private FileUtility FileUtility { get; } public FileWrapperHelper( ApiDateTimeHelper apiDateTimeHelper, @@ -168,8 +167,7 @@ public FileWrapperHelper( GlobalFolderHelper globalFolderHelper, CommonLinkUtility commonLinkUtility, FilesLinkUtility filesLinkUtility, - FileUtility fileUtility, - IServiceProvider serviceProvider) + FileUtility fileUtility) : base(apiDateTimeHelper, employeeWrapperHelper) { AuthContext = authContext; @@ -178,8 +176,7 @@ public FileWrapperHelper( GlobalFolderHelper = globalFolderHelper; CommonLinkUtility = commonLinkUtility; FilesLinkUtility = filesLinkUtility; - FileUtility = fileUtility; - ServiceProvider = serviceProvider; + FileUtility = fileUtility; } public FileWrapper Get(File file, List, bool>> folders = null) diff --git a/products/ASC.Files/Core/Services/DocumentService/Configuration.cs b/products/ASC.Files/Core/Services/DocumentService/Configuration.cs index f5689265a29..023a4c4b68c 100644 --- a/products/ASC.Files/Core/Services/DocumentService/Configuration.cs +++ b/products/ASC.Files/Core/Services/DocumentService/Configuration.cs @@ -245,9 +245,7 @@ public string Folder public string Owner { set { } - get { - return File.CreateByString; - } + get { return File.CreateByString; } } public string Uploaded diff --git a/products/ASC.Files/Core/Utils/FileShareLink.cs b/products/ASC.Files/Core/Utils/FileShareLink.cs index 842ee0e743b..f47bf21d3d5 100644 --- a/products/ASC.Files/Core/Utils/FileShareLink.cs +++ b/products/ASC.Files/Core/Utils/FileShareLink.cs @@ -24,7 +24,6 @@ */ -using System; using System.Web; using ASC.Common; @@ -46,23 +45,20 @@ public class FileShareLink private FilesLinkUtility FilesLinkUtility { get; } private BaseCommonLinkUtility BaseCommonLinkUtility { get; } private Global Global { get; } - private FileSecurity FileSecurity { get; } - private IServiceProvider ServiceProvider { get; } + private FileSecurity FileSecurity { get; } public FileShareLink( FileUtility fileUtility, FilesLinkUtility filesLinkUtility, BaseCommonLinkUtility baseCommonLinkUtility, Global global, - FileSecurity fileSecurity, - IServiceProvider serviceProvider) + FileSecurity fileSecurity) { FileUtility = fileUtility; FilesLinkUtility = filesLinkUtility; BaseCommonLinkUtility = baseCommonLinkUtility; Global = global; - FileSecurity = fileSecurity; - ServiceProvider = serviceProvider; + FileSecurity = fileSecurity; } public string GetLink(File file, bool withHash = true)