public void DoInsideDeleteLatestVersion(int moduleId, Action <VersioningActionInfo> action) { if (IsVersioningEnabled(moduleId)) { var moduleVersionSettings = new ModuleVersionSettingsController(moduleId); moduleVersionSettings.DeleteLatestVersion(); } var versioningActionInfo = new VersioningActionInfo() { }; action.Invoke(versioningActionInfo); }
public void DoInsideVersioning(int moduleId, int userId, Action <VersioningActionInfo> action) { if (IsVersioningEnabled(moduleId)) { var moduleVersionSettings = new ModuleVersionSettingsController(moduleId); if (moduleVersionSettings.IsLatestVersionPublished()) { // If the latest version is published, get an new version number and submit it to DNN TabChangeTracker.Instance.TrackModuleModification ( moduleVersionSettings.ModuleInfo, moduleVersionSettings.IncreaseLatestVersion(), userId ); } } var versioningActionInfo = new VersioningActionInfo() { }; action.Invoke(versioningActionInfo); }
public int GetLatestVersion(int moduleId) { var moduleVersionSettings = new ModuleVersionSettingsController(moduleId); return(moduleVersionSettings.GetLatestVersion()); }