示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        public int GetLatestVersion(int moduleId)
        {
            var moduleVersionSettings = new ModuleVersionSettingsController(moduleId);

            return(moduleVersionSettings.GetLatestVersion());
        }