public int AddFolder(int PortalID, string FolderPath, int StorageLocation, bool IsProtected, bool IsCached, System.DateTime LastUpdated) { int FolderId; FolderPath = FileSystemUtils.FormatFolderPath(FolderPath); FolderInfo folder = GetFolder(PortalID, FolderPath, true); if (folder == null) { FolderId = DataProvider.Instance().AddFolder(PortalID, FolderPath, StorageLocation, IsProtected, IsCached, LastUpdated, UserController.GetCurrentUserInfo().UserID); folder = GetFolder(PortalID, FolderPath, true); Services.Log.EventLog.EventLogController objEventLog = new Services.Log.EventLog.EventLogController(); objEventLog.AddLog(folder, PortalController.GetCurrentPortalSettings(), UserController.GetCurrentUserInfo().UserID, "", Log.EventLog.EventLogController.EventLogType.FOLDER_CREATED); UpdateParentFolder(PortalID, FolderPath); } else { FolderId = folder.FolderID; DataProvider.Instance().UpdateFolder(PortalID, FolderId, FolderPath, StorageLocation, IsProtected, IsCached, LastUpdated, UserController.GetCurrentUserInfo().UserID); Services.Log.EventLog.EventLogController objEventLog = new Services.Log.EventLog.EventLogController(); objEventLog.AddLog("FolderPath", FolderPath, PortalController.GetCurrentPortalSettings(), UserController.GetCurrentUserInfo().UserID, Log.EventLog.EventLogController.EventLogType.FOLDER_UPDATED); } DataCache.ClearFolderCache(PortalID); return(FolderId); }
public void UpdateFolder(FolderInfo objFolderInfo) { DataProvider.Instance().UpdateFolder(objFolderInfo.PortalID, objFolderInfo.FolderID, FileSystemUtils.FormatFolderPath(objFolderInfo.FolderPath), objFolderInfo.StorageLocation, objFolderInfo.IsProtected, objFolderInfo.IsCached, objFolderInfo.LastUpdated, UserController.GetCurrentUserInfo().UserID); Services.Log.EventLog.EventLogController objEventLog = new Services.Log.EventLog.EventLogController(); objEventLog.AddLog(objFolderInfo, PortalController.GetCurrentPortalSettings(), UserController.GetCurrentUserInfo().UserID, "", Log.EventLog.EventLogController.EventLogType.FOLDER_UPDATED); DataCache.ClearFolderCache(objFolderInfo.PortalID); }
public void DeleteFolder(int PortalID, string FolderPath) { DataProvider.Instance().DeleteFolder(PortalID, FileSystemUtils.FormatFolderPath(FolderPath)); Services.Log.EventLog.EventLogController objEventLog = new Services.Log.EventLog.EventLogController(); objEventLog.AddLog("FolderPath", FolderPath, PortalController.GetCurrentPortalSettings(), UserController.GetCurrentUserInfo().UserID, Log.EventLog.EventLogController.EventLogType.FOLDER_DELETED); UpdateParentFolder(PortalID, FolderPath); DataCache.ClearFolderCache(PortalID); }
/// <summary> /// Copies the permissions to subfolders. /// </summary> /// <param name="folder">The parent folder.</param> /// <param name="newPermissions">The new permissions.</param> public static void CopyPermissionsToSubfolders(IFolderInfo folder, FolderPermissionCollection newPermissions) { bool clearCache = CopyPermissionsToSubfoldersRecursive(folder, newPermissions); if (clearCache) { DataCache.ClearFolderCache(folder.PortalID); } }
public int AddFolder(int PortalID, string FolderPath, int StorageLocation, bool IsProtected, bool IsCached, DateTime LastUpdated) { FolderPath = FileSystemUtils.FormatFolderPath(FolderPath); FolderInfo folder = GetFolder(PortalID, FolderPath, true); folder.StorageLocation = StorageLocation; folder.IsProtected = IsProtected; folder.IsCached = IsCached; folder.LastUpdated = Null.NullDate; DataCache.ClearFolderCache(PortalID); return(AddFolder(folder)); }
private static void ClearPermissionCache(int PortalID) { DataCache.ClearFolderPermissionsCache(PortalID); DataCache.ClearCache(string.Format("Folders|{0}|", PortalID)); DataCache.ClearFolderCache(PortalID); }