From 42805c47dac25e0b7baecba1ee931d85b4add38e Mon Sep 17 00:00:00 2001 From: John Henley Date: Wed, 17 Apr 2024 21:33:42 +0000 Subject: [PATCH 1/2] update caching --- .../Controllers/ReplyController.cs | 37 ++++++++++++++----- .../Controllers/TopicController.cs | 21 +++++++++++ .../CustomControls/UserControls/ForumView.cs | 18 +++++++-- Dnn.CommunityForums/controls/af_post.ascx.cs | 9 +---- .../controls/af_quickreply.ascx.cs | 2 - 5 files changed, 65 insertions(+), 22 deletions(-) diff --git a/Dnn.CommunityForums/Controllers/ReplyController.cs b/Dnn.CommunityForums/Controllers/ReplyController.cs index 2ae8d770..d237e48c 100644 --- a/Dnn.CommunityForums/Controllers/ReplyController.cs +++ b/Dnn.CommunityForums/Controllers/ReplyController.cs @@ -21,10 +21,12 @@ using DotNetNuke.Modules.ActiveForums.Entities; using DotNetNuke.Services.FileSystem; using DotNetNuke.Services.Journal; +using DotNetNuke.UI.UserControls; using System; using System.Collections.Generic; using System.Data; using System.Linq; +using System.Reflection; using System.Text; namespace DotNetNuke.Modules.ActiveForums.Controllers @@ -50,6 +52,12 @@ internal static DotNetNuke.Modules.ActiveForums.Entities.ReplyInfo GetReply(int public void Reply_Delete(int PortalId, int ForumId, int TopicId, int ReplyId, int DelBehavior) { DataProvider.Instance().Reply_Delete(ForumId, TopicId, ReplyId, DelBehavior); + var ri = new DotNetNuke.Modules.ActiveForums.Controllers.ReplyController().GetById(ReplyId); + DataCache.ContentCacheClear(ri.ModuleId, string.Format(CacheKeys.ForumInfo, ri.ModuleId, ForumId)); + DataCache.CacheClearPrefix(ri.ModuleId, string.Format(CacheKeys.ForumViewPrefix, ri.ModuleId)); + DataCache.CacheClearPrefix(ri.ModuleId, string.Format(CacheKeys.TopicViewPrefix, ri.ModuleId)); + DataCache.CacheClearPrefix(ri.ModuleId, string.Format(CacheKeys.TopicsViewPrefix, ri.ModuleId)); + var objectKey = string.Format("{0}:{1}:{2}", ForumId, TopicId, ReplyId); JournalController.Instance.DeleteJournalItemByKey(PortalId, objectKey); @@ -100,9 +108,15 @@ public int Reply_Save(int PortalId, int ModuleId, DotNetNuke.Modules.ActiveForum { ri.Content.DateCreated = DateTime.UtcNow; } + Utilities.UpdateModuleLastContentModifiedOnDate(ModuleId); // Clear profile Cache to make sure the LastPostDate is updated for Flood Control UserProfileController.Profiles_ClearCache(ModuleId, ri.Content.AuthorId); + DataCache.ContentCacheClear(ri.ModuleId, string.Format(CacheKeys.ForumInfo, ri.ModuleId, ri.ForumId)); + DataCache.CacheClearPrefix(ri.ModuleId, string.Format(CacheKeys.ForumViewPrefix, ri.ModuleId)); + DataCache.CacheClearPrefix(ri.ModuleId, string.Format(CacheKeys.TopicViewPrefix, ri.ModuleId)); + DataCache.CacheClearPrefix(ri.ModuleId, string.Format(CacheKeys.TopicsViewPrefix, ri.ModuleId)); + DataCache.ContentCacheClear(ri.ModuleId, string.Format(CacheKeys.TopicViewForUser, ri.ModuleId, ri.TopicId, ri.Content.AuthorId)); return Convert.ToInt32(DataProvider.Instance().Reply_Save(PortalId, ri.TopicId, ri.ReplyId, ri.ReplyToId, ri.StatusId, ri.IsApproved, ri.IsDeleted, ri.Content.Subject.Trim(), ri.Content.Body.Trim(), ri.Content.DateCreated, ri.Content.DateUpdated, ri.Content.AuthorId, ri.Content.AuthorName, ri.Content.IPAddress)); } public DotNetNuke.Modules.ActiveForums.Entities.ReplyInfo Reply_Get(int PortalId, int ModuleId, int TopicId, int ReplyId) @@ -115,21 +129,21 @@ public DotNetNuke.Modules.ActiveForums.Entities.ReplyInfo ApproveReply(int Porta DotNetNuke.Modules.ActiveForums.Entities.ForumInfo fi = new DotNetNuke.Modules.ActiveForums.Controllers.ForumController().GetById(forumId: ForumId, moduleId: ModuleId); ReplyController rc = new ReplyController(); - DotNetNuke.Modules.ActiveForums.Entities.ReplyInfo reply = rc.Reply_Get(PortalId, ModuleId, TopicId, ReplyId); - if (reply == null) + DotNetNuke.Modules.ActiveForums.Entities.ReplyInfo ri = rc.Reply_Get(PortalId, ModuleId, TopicId, ReplyId); + if (ri == null) { return null; } - reply.IsApproved = true; - rc.Reply_Save(PortalId, ModuleId, reply); + ri.IsApproved = true; + rc.Reply_Save(PortalId, ModuleId, ri); DotNetNuke.Modules.ActiveForums.Controllers.TopicController.SaveToForum(ModuleId, ForumId, TopicId, ReplyId); DotNetNuke.Modules.ActiveForums.Entities.TopicInfo topic = new DotNetNuke.Modules.ActiveForums.Controllers.TopicController().GetById(TopicId); - if (fi.ModApproveTemplateId > 0 & reply.Author.AuthorId > 0) + if (fi.ModApproveTemplateId > 0 & ri.Author.AuthorId > 0) { - Email.SendEmail(fi.ModApproveTemplateId, PortalId, ModuleId, TabId, ForumId, TopicId, ReplyId, string.Empty, reply.Author); + Email.SendEmail(fi.ModApproveTemplateId, PortalId, ModuleId, TabId, ForumId, TopicId, ReplyId, string.Empty, ri.Author); } - Subscriptions.SendSubscriptions(-1, PortalId, ModuleId, TabId, fi, TopicId, ReplyId, reply.Content.AuthorId); + Subscriptions.SendSubscriptions(-1, PortalId, ModuleId, TabId, fi, TopicId, ReplyId, ri.Content.AuthorId); try { @@ -145,13 +159,18 @@ public DotNetNuke.Modules.ActiveForums.Entities.ReplyInfo ApproveReply(int Porta fullURL += Utilities.UseFriendlyURLs(ModuleId) ? String.Concat("#", ReplyId) : String.Concat("?", ParamKeys.ContentJumpId, "=", ReplyId); } Social amas = new Social(); - amas.AddReplyToJournal(PortalId, ModuleId, TabId, ForumId, TopicId, ReplyId, reply.Author.AuthorId, fullURL, reply.Content.Subject, string.Empty, reply.Content.Body, fi.Security.Read, fi.SocialGroupId); + amas.AddReplyToJournal(PortalId, ModuleId, TabId, ForumId, TopicId, ReplyId, ri.Author.AuthorId, fullURL, ri.Content.Subject, string.Empty, ri.Content.Body, fi.Security.Read, fi.SocialGroupId); + + DataCache.ContentCacheClear(ri.ModuleId, string.Format(CacheKeys.ForumInfo, ri.ModuleId, ri.ForumId)); + DataCache.CacheClearPrefix(ri.ModuleId, string.Format(CacheKeys.ForumViewPrefix, ri.ModuleId)); + DataCache.CacheClearPrefix(ri.ModuleId, string.Format(CacheKeys.TopicViewPrefix, ri.ModuleId)); + DataCache.CacheClearPrefix(ri.ModuleId, string.Format(CacheKeys.TopicsViewPrefix, ri.ModuleId)); } catch (Exception ex) { DotNetNuke.Services.Exceptions.Exceptions.LogException(ex); } - return reply; + return ri; } } } diff --git a/Dnn.CommunityForums/Controllers/TopicController.cs b/Dnn.CommunityForums/Controllers/TopicController.cs index 0d4fbd7f..e3b27443 100644 --- a/Dnn.CommunityForums/Controllers/TopicController.cs +++ b/Dnn.CommunityForums/Controllers/TopicController.cs @@ -118,6 +118,11 @@ public static DotNetNuke.Modules.ActiveForums.Entities.TopicInfo Approve(int Top DotNetNuke.Modules.ActiveForums.Controllers.TopicController.Save(ti); DotNetNuke.Modules.ActiveForums.Controllers.TopicController.SaveToForum(ti.ModuleId, ti.ForumId, TopicId); + DataCache.ContentCacheClear(ti.ModuleId, string.Format(CacheKeys.ForumInfo, ti.ModuleId, ti.ForumId)); + DataCache.CacheClearPrefix(ti.ModuleId, string.Format(CacheKeys.ForumViewPrefix, ti.ModuleId)); + DataCache.CacheClearPrefix(ti.ModuleId, string.Format(CacheKeys.TopicViewPrefix, ti.ModuleId)); + DataCache.CacheClearPrefix(ti.ModuleId, string.Format(CacheKeys.TopicsViewPrefix, ti.ModuleId)); + if (ti.Forum.ModApproveTemplateId > 0 & ti.Author.AuthorId > 0) { Email.SendEmail(ti.Forum.ModApproveTemplateId, ti.PortalId, ti.ModuleId, ti.Forum.TabId, ti.ForumId, TopicId, 0, string.Empty, ti.Author); @@ -164,10 +169,18 @@ public static void Move(int TopicId, int NewForumId) } DataProvider.Instance().Topics_Move(ti.PortalId, ti.ModuleId, NewForumId, TopicId); Utilities.UpdateModuleLastContentModifiedOnDate(ti.ModuleId); + DataCache.ContentCacheClear(ti.ModuleId, string.Format(CacheKeys.ForumInfo, ti.ModuleId, ti.ForumId)); + DataCache.CacheClearPrefix(ti.ModuleId, string.Format(CacheKeys.ForumViewPrefix, ti.ModuleId)); + DataCache.CacheClearPrefix(ti.ModuleId, string.Format(CacheKeys.TopicViewPrefix, ti.ModuleId)); + DataCache.CacheClearPrefix(ti.ModuleId, string.Format(CacheKeys.TopicsViewPrefix, ti.ModuleId)); } public static int SaveToForum(int ModuleId, int ForumId, int TopicId, int LastReplyId = -1) { Utilities.UpdateModuleLastContentModifiedOnDate(ModuleId); + DataCache.ContentCacheClear(ModuleId, string.Format(CacheKeys.ForumInfo, ModuleId, ForumId)); + DataCache.CacheClearPrefix(ModuleId, string.Format(CacheKeys.ForumViewPrefix, ModuleId)); + DataCache.CacheClearPrefix(ModuleId, string.Format(CacheKeys.TopicViewPrefix, ModuleId)); + DataCache.CacheClearPrefix(ModuleId, string.Format(CacheKeys.TopicsViewPrefix, ModuleId)); return Convert.ToInt32(DataProvider.Instance().Topics_SaveToForum(ForumId, TopicId, LastReplyId)); } public static int Save(DotNetNuke.Modules.ActiveForums.Entities.TopicInfo ti) @@ -183,6 +196,11 @@ public static int Save(DotNetNuke.Modules.ActiveForums.Entities.TopicInfo ti) var uc = new Data.Profiles(); uc.Profile_UpdateTopicCount(ti.Forum.PortalId, ti.Author.AuthorId); } + Utilities.UpdateModuleLastContentModifiedOnDate(ti.ModuleId); + DataCache.ContentCacheClear(ti.ModuleId, string.Format(CacheKeys.ForumInfo, ti.ModuleId, ti.ForumId)); + DataCache.CacheClearPrefix(ti.ModuleId, string.Format(CacheKeys.ForumViewPrefix, ti.ModuleId)); + DataCache.CacheClearPrefix(ti.ModuleId, string.Format(CacheKeys.TopicViewPrefix, ti.ModuleId)); + DataCache.CacheClearPrefix(ti.ModuleId, string.Format(CacheKeys.TopicsViewPrefix, ti.ModuleId)); //TODO: convert to use DAL2? return Convert.ToInt32(DataProvider.Instance().Topics_Save(ti.Forum.PortalId, ti.TopicId, ti.ViewCount, ti.ReplyCount, ti.IsLocked, ti.IsPinned, ti.TopicIcon, ti.StatusId, ti.IsApproved, ti.IsDeleted, ti.IsAnnounce, ti.IsArchived, ti.AnnounceStart, ti.AnnounceEnd, ti.Content.Subject.Trim(), ti.Content.Body.Trim(), ti.Content.Summary.Trim(), ti.Content.DateCreated, ti.Content.DateUpdated, ti.Content.AuthorId, ti.Content.AuthorName, ti.Content.IPAddress, (int)ti.TopicType, ti.Priority, ti.TopicUrl, ti.TopicData)); } @@ -203,7 +221,10 @@ public void DeleteById(int TopicId) DataProvider.Instance().Topics_Delete(ti.ForumId, TopicId, SettingsBase.GetModuleSettings(ti.ModuleId).DeleteBehavior ); Utilities.UpdateModuleLastContentModifiedOnDate(ti.ModuleId); + DataCache.ContentCacheClear(ti.ModuleId, string.Format(CacheKeys.ForumInfo, ti.ModuleId, ti.ForumId)); DataCache.CacheClearPrefix(ti.ModuleId, string.Format(CacheKeys.ForumViewPrefix, ti.ModuleId)); + DataCache.CacheClearPrefix(ti.ModuleId, string.Format(CacheKeys.TopicViewPrefix, ti.ModuleId)); + DataCache.CacheClearPrefix(ti.ModuleId, string.Format(CacheKeys.TopicsViewPrefix, ti.ModuleId)); if (SettingsBase.GetModuleSettings(ti.ModuleId).DeleteBehavior != 0) return; diff --git a/Dnn.CommunityForums/CustomControls/UserControls/ForumView.cs b/Dnn.CommunityForums/CustomControls/UserControls/ForumView.cs index ac8ae989..de915eaf 100644 --- a/Dnn.CommunityForums/CustomControls/UserControls/ForumView.cs +++ b/Dnn.CommunityForums/CustomControls/UserControls/ForumView.cs @@ -29,6 +29,8 @@ using System.Collections.Generic; using System.Reflection; using System.Linq; +using System.IO; +using System.Web.Http.Results; namespace DotNetNuke.Modules.ActiveForums.Controls { @@ -192,11 +194,21 @@ public string BuildForumView() if (Forums == null) { - Forums = new DotNetNuke.Modules.ActiveForums.Entities.ForumCollection(); - foreach (string ForumId in ForumIds.Split(separator: ";".ToCharArray(), options: StringSplitOptions.RemoveEmptyEntries)) + string cachekey = string.Format(CacheKeys.ForumViewForUser, ForumModuleId, ForumUser.UserId, ForumIds); + var obj = DataCache.ContentCacheRetrieve(ForumModuleId, cachekey); + if (obj == null) { - Forums.Add(new DotNetNuke.Modules.ActiveForums.Controllers.ForumController().GetById(Utilities.SafeConvertInt(ForumId),ForumModuleId)); + Forums = new DotNetNuke.Modules.ActiveForums.Entities.ForumCollection(); + foreach (string ForumId in ForumIds.Split(separator: ";".ToCharArray(), options: StringSplitOptions.RemoveEmptyEntries)) + { + Forums.Add(new DotNetNuke.Modules.ActiveForums.Controllers.ForumController().GetById(Utilities.SafeConvertInt(ForumId), ForumModuleId)); + } + DataCache.ContentCacheStore(ForumModuleId, cachekey, Forums); } + else + { + Forums = (List)obj; + } } } Forums = (Forums.OrderBy(f => f.ForumGroup.SortOrder).ThenBy(f => f.SortOrder).ToList()); diff --git a/Dnn.CommunityForums/controls/af_post.ascx.cs b/Dnn.CommunityForums/controls/af_post.ascx.cs index 2f5871d9..91126652 100644 --- a/Dnn.CommunityForums/controls/af_post.ascx.cs +++ b/Dnn.CommunityForums/controls/af_post.ascx.cs @@ -822,13 +822,9 @@ private void SaveTopic() { new DotNetNuke.Modules.ActiveForums.Controllers.SubscriptionController().Subscribe(PortalId, ForumModuleId, UserId, ForumId, ti.TopicId); } - Utilities.UpdateModuleLastContentModifiedOnDate(ForumModuleId); try - { - DataCache.ContentCacheClear(ForumModuleId, string.Format(CacheKeys.TopicViewForUser, ForumModuleId, TopicId, authorId)); - DataCache.CacheClearPrefix(ForumModuleId, string.Format(CacheKeys.ForumViewPrefix, ForumModuleId)); - + { if (bSend && !_isEdit) Subscriptions.SendSubscriptions(PortalId, ForumModuleId, TabId, _fi.ForumID, TopicId, 0, ti.Content.AuthorId); @@ -990,11 +986,8 @@ private void SaveReply() new DotNetNuke.Modules.ActiveForums.Controllers.SubscriptionController().Subscribe(PortalId, ForumModuleId, UserId, ForumId, ri.TopicId); } var tmpReplyId = new DotNetNuke.Modules.ActiveForums.Controllers.ReplyController().Reply_Save(PortalId, ForumModuleId, ri); - Utilities.UpdateModuleLastContentModifiedOnDate(ForumModuleId); ri = new DotNetNuke.Modules.ActiveForums.Controllers.ReplyController().Reply_Get(PortalId, ForumModuleId, TopicId, tmpReplyId); SaveAttachments(ri.ContentId); - DataCache.ContentCacheClear(ForumModuleId, string.Format(CacheKeys.TopicViewForUser, ForumModuleId, ri.TopicId, ri.Content.AuthorId)); - DataCache.CacheClearPrefix(ForumModuleId, string.Format(CacheKeys.ForumViewPrefix, ForumModuleId)); try { if (bSend && !_isEdit) diff --git a/Dnn.CommunityForums/controls/af_quickreply.ascx.cs b/Dnn.CommunityForums/controls/af_quickreply.ascx.cs index 7489cf86..e4fdaf34 100644 --- a/Dnn.CommunityForums/controls/af_quickreply.ascx.cs +++ b/Dnn.CommunityForums/controls/af_quickreply.ascx.cs @@ -320,8 +320,6 @@ private void SaveQuickReply() } int ReplyId = new DotNetNuke.Modules.ActiveForums.Controllers.ReplyController().Reply_Save(PortalId, ModuleId, ri); Utilities.UpdateModuleLastContentModifiedOnDate(ModuleId); - DataCache.ContentCacheClear(ModuleId, string.Format(CacheKeys.TopicViewForUser, ModuleId, ri.TopicId, ri.Content.AuthorId)); - DataCache.CacheClearPrefix(ModuleId, string.Format(CacheKeys.ForumViewPrefix, ModuleId)); DotNetNuke.Modules.ActiveForums.Entities.TopicInfo ti = new DotNetNuke.Modules.ActiveForums.Controllers.TopicController().GetById(TopicId); From bf6c4f7f74eaa2eadde45f29e807d98f503249e6 Mon Sep 17 00:00:00 2001 From: John Henley Date: Tue, 30 Apr 2024 15:44:41 +0000 Subject: [PATCH 2/2] Various pre-release testing tweaks --- .../ActiveForumViewerSettings.ascx.cs | 1 - .../ForumSettings.ascx.resx | 3 - .../Controllers/ForumController.cs | 26 +- .../Controllers/ReplyController.cs | 78 +- .../Controllers/TopicController.cs | 2 +- .../CustomControls/HTML/SecurityGrid.cs | 1 - .../CustomControls/HTML/TopicViewer.cs | 1 - .../ServerControls/ActiveTabs.cs | 1 - .../CustomControls/UserControls/ForumView.cs | 18 +- .../CustomControls/UserControls/TopicView.cs | 2 +- .../CustomControls/UserControls/TopicsView.cs | 1 - .../UserControls/WhatsNewRSS.cs | 1 - Dnn.CommunityForums/Deprecated/Cache.cs | 2 +- Dnn.CommunityForums/Deprecated/Utilities.cs | 2 +- Dnn.CommunityForums/DnnCommunityForums.csproj | 4138 ++++++++--------- Dnn.CommunityForums/Entities/ForumInfo.cs | 2 +- Dnn.CommunityForums/ForumSettings.ascx.cs | 5 - .../SqlDataProvider/SqlDataProvider.cs | 2 +- .../Services/AdminServiceController.cs | 1 - .../Services/Controllers/ForumController.cs | 2 +- .../Services/Controllers/ReplyController.cs | 4 + .../Services/Controllers/TagController.cs | 4 + .../Services/Controllers/TopicController.cs | 8 + .../Services/ModerationService.cs | 2 - Dnn.CommunityForums/class/Cache.cs | 28 +- Dnn.CommunityForums/class/DataProvider.cs | 1 - Dnn.CommunityForums/class/ForumController.cs | 25 +- Dnn.CommunityForums/class/Subscriptions.cs | 12 +- Dnn.CommunityForums/class/UserProfiles.cs | 1 - Dnn.CommunityForums/class/Utilities.cs | 3 - .../controls/admin_home.ascx.cs | 5 - .../controls/admin_securitygrid.ascx.cs | 1 - .../controls/af_members.ascx.cs | 1 - .../controls/af_modtopics.ascx.cs | 1 - Dnn.CommunityForums/controls/af_post.ascx.cs | 28 +- .../controls/af_posticonlist.ascx.cs | 29 +- .../TopicPropertyControllerTests.cs | 2 +- 37 files changed, 2205 insertions(+), 2239 deletions(-) diff --git a/Dnn.CommunityForums/ActiveForumViewerSettings.ascx.cs b/Dnn.CommunityForums/ActiveForumViewerSettings.ascx.cs index d96f1738..7e065697 100644 --- a/Dnn.CommunityForums/ActiveForumViewerSettings.ascx.cs +++ b/Dnn.CommunityForums/ActiveForumViewerSettings.ascx.cs @@ -97,7 +97,6 @@ public override void UpdateSettings() objModules.UpdateModuleSetting(ModuleId, ForumViewerSettingsKeys.AFForumGroup, drpForum.SelectedItem.Value); //objModules.UpdateModuleSetting(ModuleId, "AFEnableToolbar", CType(chkEnableToolbar.Checked, String)) string ForumGroup; - int ForumGroupID = 0; ForumGroup = drpForum.SelectedItem.Value; if ((ForumGroup.IndexOf("GROUPID:", 0) + 1) > 0) { diff --git a/Dnn.CommunityForums/App_LocalResources/ForumSettings.ascx.resx b/Dnn.CommunityForums/App_LocalResources/ForumSettings.ascx.resx index 1e8839a7..c5785714 100644 --- a/Dnn.CommunityForums/App_LocalResources/ForumSettings.ascx.resx +++ b/Dnn.CommunityForums/App_LocalResources/ForumSettings.ascx.resx @@ -381,9 +381,6 @@ View - - - User Permissions diff --git a/Dnn.CommunityForums/Controllers/ForumController.cs b/Dnn.CommunityForums/Controllers/ForumController.cs index 4b431c2e..ec8d91ed 100644 --- a/Dnn.CommunityForums/Controllers/ForumController.cs +++ b/Dnn.CommunityForums/Controllers/ForumController.cs @@ -21,6 +21,7 @@ using System.Data; using System.Linq; using System.Reflection; +using System.Text; using System.Xml; using DotNetNuke.Data; using DotNetNuke.Modules.ActiveForums.Data; @@ -144,6 +145,30 @@ public static string GetForumsForUser(string userRoles, int portalId, int module } return forumIds; } + public static string GetForumsHtmlOption(int moduleId, User currentUser) + { + var sb = new StringBuilder(); + int index = 1; + var forums = new DotNetNuke.Modules.ActiveForums.Controllers.ForumController().GetForums(moduleId).Where(f => !f.Hidden && !f.ForumGroup.Hidden && (currentUser.IsSuperUser || DotNetNuke.Modules.ActiveForums.Controllers.PermissionController.HasPerm(f.Security.View, currentUser.UserRoles))); + DotNetNuke.Modules.ActiveForums.Controllers.ForumController.IterateForumsList(forums.ToList(), currentUser, + fi => + { + sb.AppendFormat("", "-1", fi.GroupName); + index += 1; + }, + fi => + { + sb.AppendFormat("", fi.ForumID.ToString(), "--" + fi.ForumName); + index += 1; + }, + fi => + { + sb.AppendFormat("", fi.ForumID.ToString(), fi.ForumName); + index += 1; + } + ); + return sb.ToString(); + } public XmlDocument GetForumListXML(int PortalId, int ModuleId) { XmlDocument xDoc = new XmlDocument(); @@ -248,7 +273,6 @@ public XmlDocument GetForumListXML(int PortalId, int ModuleId) { xDoc = (XmlDocument)obj; } - //Logger.Log(xDoc.OuterXml) return xDoc; } public int Forums_Save(int portalId, DotNetNuke.Modules.ActiveForums.Entities.ForumInfo fi, bool isNew, bool useGroupFeatures, bool useGroupSecurity) diff --git a/Dnn.CommunityForums/Controllers/ReplyController.cs b/Dnn.CommunityForums/Controllers/ReplyController.cs index 83957aae..68617ff2 100644 --- a/Dnn.CommunityForums/Controllers/ReplyController.cs +++ b/Dnn.CommunityForums/Controllers/ReplyController.cs @@ -18,6 +18,7 @@ // DEALINGS IN THE SOFTWARE. // using DotNetNuke.Data; +using DotNetNuke.Modules.ActiveForums.Data; using DotNetNuke.Modules.ActiveForums.Services.ProcessQueue; using DotNetNuke.Services.FileSystem; using DotNetNuke.Services.Journal; @@ -27,6 +28,7 @@ using System.Collections.Generic; using System.Data; using System.Linq; +using System.Reflection; using System.Security.Policy; using System.Text; using System.Web; @@ -55,7 +57,6 @@ public void Reply_Delete(int PortalId, int ForumId, int TopicId, int ReplyId, in { var ri = GetById(ReplyId); DataProvider.Instance().Reply_Delete(ForumId, TopicId, ReplyId, DelBehavior); - var ri = new DotNetNuke.Modules.ActiveForums.Controllers.ReplyController().GetById(ReplyId); DataCache.ContentCacheClear(ri.ModuleId, string.Format(CacheKeys.ForumInfo, ri.ModuleId, ForumId)); DataCache.CacheClearPrefix(ri.ModuleId, string.Format(CacheKeys.ForumViewPrefix, ri.ModuleId)); DataCache.CacheClearPrefix(ri.ModuleId, string.Format(CacheKeys.TopicViewPrefix, ri.ModuleId)); @@ -88,19 +89,23 @@ public void Reply_Delete(int PortalId, int ForumId, int TopicId, int ReplyId, in public int Reply_QuickCreate(int PortalId, int ModuleId, int ForumId, int TopicId, int ReplyToId, string Subject, string Body, int UserId, string DisplayName, bool IsApproved, string IPAddress) { int replyId = -1; - DotNetNuke.Modules.ActiveForums.Entities.ReplyInfo ri = new DotNetNuke.Modules.ActiveForums.Entities.ReplyInfo(); - ri.TopicId = TopicId; - ri.ReplyToId = ReplyToId; - ri.IsApproved = IsApproved; - ri.IsDeleted = false; - ri.StatusId = -1; - ri.Content = new DotNetNuke.Modules.ActiveForums.Entities.ContentInfo(); - ri.Content.AuthorId = UserId; - ri.Content.AuthorName = DisplayName; - ri.Content.Subject = Subject; - ri.Content.Body = Body; - ri.Content.IPAddress = IPAddress; - ri.Content.Summary = string.Empty; + DotNetNuke.Modules.ActiveForums.Entities.ReplyInfo ri = new DotNetNuke.Modules.ActiveForums.Entities.ReplyInfo + { + TopicId = TopicId, + ReplyToId = ReplyToId, + IsApproved = IsApproved, + IsDeleted = false, + StatusId = -1, + Content = new DotNetNuke.Modules.ActiveForums.Entities.ContentInfo + { + AuthorId = UserId, + AuthorName = DisplayName, + Subject = Subject, + Body = Body, + IPAddress = IPAddress, + Summary = string.Empty + } + }; replyId = Reply_Save(PortalId, ModuleId, ri); Utilities.UpdateModuleLastContentModifiedOnDate(ModuleId); return replyId; @@ -130,24 +135,22 @@ public DotNetNuke.Modules.ActiveForums.Entities.ReplyInfo Reply_Get(int PortalId } public DotNetNuke.Modules.ActiveForums.Entities.ReplyInfo ApproveReply(int PortalId, int TabId, int ModuleId, int ForumId, int TopicId, int ReplyId) { - DotNetNuke.Modules.ActiveForums.Entities.ForumInfo fi = new DotNetNuke.Modules.ActiveForums.Controllers.ForumController().GetById(forumId: ForumId, moduleId: ModuleId); - - ReplyController rc = new ReplyController(); - DotNetNuke.Modules.ActiveForums.Entities.ReplyInfo ri = rc.Reply_Get(PortalId, ModuleId, TopicId, ReplyId); - if (ri == null) + DotNetNuke.Modules.ActiveForums.Entities.ForumInfo forum = new DotNetNuke.Modules.ActiveForums.Controllers.ForumController().GetById(forumId: ForumId, moduleId: ModuleId); + var rc = new DotNetNuke.Modules.ActiveForums.Controllers.ReplyController(); + DotNetNuke.Modules.ActiveForums.Entities.ReplyInfo reply = rc.GetById(ReplyId); + if (reply == null) { return null; } - ri.IsApproved = true; - rc.Reply_Save(PortalId, ModuleId, ri); + reply.IsApproved = true; + rc.Reply_Save(PortalId, ModuleId, reply); DotNetNuke.Modules.ActiveForums.Controllers.TopicController.SaveToForum(ModuleId, ForumId, TopicId, ReplyId); - DotNetNuke.Modules.ActiveForums.Entities.TopicInfo topic = new DotNetNuke.Modules.ActiveForums.Controllers.TopicController().GetById(TopicId); - if (fi.ModApproveTemplateId > 0 & ri.Author.AuthorId > 0) + if (forum.ModApproveTemplateId > 0 & reply.Author.AuthorId > 0) { - Email.SendEmail(fi.ModApproveTemplateId, PortalId, ModuleId, TabId, ForumId, TopicId, ReplyId, string.Empty, ri.Author); + DotNetNuke.Modules.ActiveForums.Controllers.EmailController.SendEmail(forum.ModApproveTemplateId, PortalId, ModuleId, TabId, ForumId, TopicId, ReplyId, string.Empty, reply.Author); } - DotNetNuke.Modules.ActiveForums.Controllers.ReplyController.QueueApprovedReplyAfterAction(PortalId, TabId, ModuleId, fi.ForumGroupId, ForumId, TopicId, ReplyId, reply.Content.AuthorId); + DotNetNuke.Modules.ActiveForums.Controllers.ReplyController.QueueApprovedReplyAfterAction(PortalId, TabId, ModuleId, forum.ForumGroupId, ForumId, TopicId, ReplyId, reply.Content.AuthorId); return reply; } @@ -180,10 +183,10 @@ internal static bool ProcessApprovedReplyAfterAction(int PortalId, int TabId, in Social amas = new Social(); amas.AddReplyToJournal(PortalId, ModuleId, TabId, ForumId, TopicId, ReplyId, reply.Author.AuthorId, fullURL, reply.Content.Subject, string.Empty, reply.Content.Body, reply.Forum.Security.Read, reply.Forum.SocialGroupId); - DataCache.ContentCacheClear(ri.ModuleId, string.Format(CacheKeys.ForumInfo, ri.ModuleId, ri.ForumId)); - DataCache.CacheClearPrefix(ri.ModuleId, string.Format(CacheKeys.ForumViewPrefix, ri.ModuleId)); - DataCache.CacheClearPrefix(ri.ModuleId, string.Format(CacheKeys.TopicViewPrefix, ri.ModuleId)); - DataCache.CacheClearPrefix(ri.ModuleId, string.Format(CacheKeys.TopicsViewPrefix, ri.ModuleId)); + DataCache.ContentCacheClear(reply.ModuleId, string.Format(CacheKeys.ForumInfo, reply.ModuleId, reply.ForumId)); + DataCache.CacheClearPrefix(reply.ModuleId, string.Format(CacheKeys.ForumViewPrefix, reply.ModuleId)); + DataCache.CacheClearPrefix(reply.ModuleId, string.Format(CacheKeys.TopicViewPrefix, reply.ModuleId)); + DataCache.CacheClearPrefix(reply.ModuleId, string.Format(CacheKeys.TopicsViewPrefix, reply.ModuleId)); var pqc = new DotNetNuke.Modules.ActiveForums.Controllers.ProcessQueueController(); pqc.Add(ProcessType.UpdateForumTopicPointers, PortalId, tabId: TabId, moduleId: ModuleId, forumGroupId: ForumGroupId, forumId: ForumId, topicId: TopicId, replyId: ReplyId, authorId: AuthorId, requestUrl: RequestUrl); pqc.Add(ProcessType.UpdateForumLastUpdated, PortalId, tabId: TabId, moduleId: ModuleId, forumGroupId: ForumGroupId, forumId: ForumId, topicId: TopicId, replyId: ReplyId, authorId: AuthorId, requestUrl: RequestUrl); @@ -211,13 +214,15 @@ internal static bool ProcessUnapprovedReplyAfterAction(int PortalId, int TabId, body = body.Replace("[Post]", reply.Content.Body); string notificationKey = string.Format("{0}:{1}:{2}:{3}:{4}", TabId, ModuleId, ForumId, TopicId, ReplyId); - Notification notification = new Notification(); - notification.NotificationTypeID = notificationType.NotificationTypeId; - notification.Subject = subject; - notification.Body = body; - notification.IncludeDismissAction = false; - notification.SenderUserID = reply.Content.AuthorId; - notification.Context = notificationKey; + Notification notification = new Notification + { + NotificationTypeID = notificationType.NotificationTypeId, + Subject = subject, + Body = body, + IncludeDismissAction = false, + SenderUserID = reply.Content.AuthorId, + Context = notificationKey + }; NotificationsController.Instance.SendNotification(notification, PortalId, null, mods); return true; @@ -227,7 +232,6 @@ internal static bool ProcessUnapprovedReplyAfterAction(int PortalId, int TabId, DotNetNuke.Services.Exceptions.Exceptions.LogException(ex); return false; } - return reply; } } } diff --git a/Dnn.CommunityForums/Controllers/TopicController.cs b/Dnn.CommunityForums/Controllers/TopicController.cs index 3fb05857..38f4fda1 100644 --- a/Dnn.CommunityForums/Controllers/TopicController.cs +++ b/Dnn.CommunityForums/Controllers/TopicController.cs @@ -128,7 +128,7 @@ public static DotNetNuke.Modules.ActiveForums.Entities.TopicInfo Approve(int Top if (ti.Forum.ModApproveTemplateId > 0 & ti.Author.AuthorId > 0) { - Email.SendEmail(ti.Forum.ModApproveTemplateId, ti.PortalId, ti.ModuleId, ti.Forum.TabId, ti.ForumId, TopicId, 0, string.Empty, ti.Author); + DotNetNuke.Modules.ActiveForums.Controllers.EmailController.SendEmail(ti.Forum.ModApproveTemplateId, ti.PortalId, ti.ModuleId, ti.Forum.TabId, ti.ForumId, TopicId, 0, string.Empty, ti.Author); } DotNetNuke.Modules.ActiveForums.Controllers.TopicController.QueueApprovedTopicAfterAction(ti.PortalId, ti.Forum.TabId, ti.Forum.ModuleId, ti.Forum.ForumGroupId, ti.ForumId, TopicId, -1, ti.Content.AuthorId); return ti; diff --git a/Dnn.CommunityForums/CustomControls/HTML/SecurityGrid.cs b/Dnn.CommunityForums/CustomControls/HTML/SecurityGrid.cs index 868e83e2..5b32b5f0 100644 --- a/Dnn.CommunityForums/CustomControls/HTML/SecurityGrid.cs +++ b/Dnn.CommunityForums/CustomControls/HTML/SecurityGrid.cs @@ -157,7 +157,6 @@ public string GetNewGrid() sb.Append("
"); sb.Append(""); string tmpObjectName = string.Empty; - int secRows = 0; for (int x = 0; x < pl.Count; x++) { sb.Append("
" + Utilities.GetSharedResource("[RESX:SecureObjects]", true) + "
"); diff --git a/Dnn.CommunityForums/CustomControls/HTML/TopicViewer.cs b/Dnn.CommunityForums/CustomControls/HTML/TopicViewer.cs index 898d6a30..acaffdd0 100644 --- a/Dnn.CommunityForums/CustomControls/HTML/TopicViewer.cs +++ b/Dnn.CommunityForums/CustomControls/HTML/TopicViewer.cs @@ -213,7 +213,6 @@ public string Render() { System.Text.StringBuilder sb = new System.Text.StringBuilder(); Data.Topics db = new Data.Topics(); - int i = 0; using (IDataReader dr = db.TopicWithReplies(PortalId, TopicId, PageIndex, PageSize)) { diff --git a/Dnn.CommunityForums/CustomControls/ServerControls/ActiveTabs.cs b/Dnn.CommunityForums/CustomControls/ServerControls/ActiveTabs.cs index 118fbb72..e37a1cc3 100644 --- a/Dnn.CommunityForums/CustomControls/ServerControls/ActiveTabs.cs +++ b/Dnn.CommunityForums/CustomControls/ServerControls/ActiveTabs.cs @@ -216,7 +216,6 @@ protected override void Render(System.Web.UI.HtmlTextWriter writer) System.Text.StringBuilder sb = new System.Text.StringBuilder(); int i = 0; - string controlToLoad = ""; writer = new HtmlTextWriter(writer, string.Empty); AddAttributesToRender(writer); foreach (Tab tab in Tabs) diff --git a/Dnn.CommunityForums/CustomControls/UserControls/ForumView.cs b/Dnn.CommunityForums/CustomControls/UserControls/ForumView.cs index 5b385682..75d65bd1 100644 --- a/Dnn.CommunityForums/CustomControls/UserControls/ForumView.cs +++ b/Dnn.CommunityForums/CustomControls/UserControls/ForumView.cs @@ -181,11 +181,15 @@ public string BuildForumView() string tmpGroup = string.Empty; #region "backward compatibilty - remove when removing ForumTable property" - /* this is for backward compatibility -- remove when removing ForumTable property */ +#pragma warning disable CS0618 + /* this is for backward compatibility -- remove when removing ForumTable property in 10.00.00 */ if (ForumTable != null) +#pragma warning restore CS0618 { Forums = new DotNetNuke.Modules.ActiveForums.Entities.ForumCollection(); +#pragma warning disable CS0618 foreach (DataRow dr in ForumTable.DefaultView.ToTable().Rows) +#pragma warning restore CS0618 { Forums.Add(new DotNetNuke.Modules.ActiveForums.Controllers.ForumController().GetById(Utilities.SafeConvertInt(dr["ForumId"]), ForumModuleId)); } @@ -208,7 +212,7 @@ public string BuildForumView() else { Forums = (List)obj; - } } + } } Forums = (Forums.OrderBy(f => f.ForumGroup.SortOrder).ThenBy(f => f.SortOrder).ToList()); @@ -495,7 +499,6 @@ private string ParseForumRow(string Template, DotNetNuke.Modules.ActiveForums.En Template = Template.Replace("[DISPLAYNAME]", string.Empty); Template = Template.Replace("[LASTPOSTDATE]", string.Empty); Template = Template.Replace(ReplaceTag, string.Empty); - //Template = TemplateUtils.ParseUserDetails(PortalId, -1, Template, String.Empty) } else { @@ -503,16 +506,13 @@ private string ParseForumRow(string Template, DotNetNuke.Modules.ActiveForums.En { if (fi.LastPostUserID <= 0) { - //Template = Template.Replace("[RESX:BY]", String.Empty) Template = Template.Replace("[DISPLAYNAME]", " " + fi.LastPostDisplayName); - //Template = TemplateUtils.ParseUserDetails(PortalId, -1, Template, "FG") } else { bool isMod = CurrentUserType == CurrentUserTypes.Admin || CurrentUserType == CurrentUserTypes.ForumMod || CurrentUserType == CurrentUserTypes.SuperUser; bool isAdmin = CurrentUserType == CurrentUserTypes.Admin || CurrentUserType == CurrentUserTypes.SuperUser; Template = Template.Replace("[DISPLAYNAME]", " " + UserProfiles.GetDisplayName(ForumModuleId, true, isMod, isAdmin, fi.LastPostUserID, fi.LastPostUserName, fi.LastPostFirstName, fi.LastPostLastName, fi.LastPostDisplayName)); - //Template = TemplateUtils.ParseUserDetails(PortalId, .LastPostUserID, Template, "FG") } DateTime dtLastPostDate = fi.LastPostDateTime; Template = Template.Replace("[LASTPOSTDATE]", Utilities.GetUserFormattedDateTime(dtLastPostDate,PortalId, CurrentUserId)); @@ -523,12 +523,6 @@ private string ParseForumRow(string Template, DotNetNuke.Modules.ActiveForums.En } if (Subject != string.Empty) { - string sDots = ""; - if (Subject.Length > intLength) - { - sDots = "..."; - } - Template = Template.Replace(ReplaceTag, GetLastPostSubject(fi.LastPostID, fi.LastTopicId, fi.ForumID, TabId, Subject, intLength, MainSettings.PageSize, fi)); } else diff --git a/Dnn.CommunityForums/CustomControls/UserControls/TopicView.cs b/Dnn.CommunityForums/CustomControls/UserControls/TopicView.cs index 5acb7d90..3201c432 100644 --- a/Dnn.CommunityForums/CustomControls/UserControls/TopicView.cs +++ b/Dnn.CommunityForums/CustomControls/UserControls/TopicView.cs @@ -958,7 +958,7 @@ private string ParseControls(string sOutput) if (ForumInfo.ParentForumId > 0) { if (MainSettings.UseShortUrls) - sbOutput.Replace("oldValue: [PARENTFORUMLINK]", "" + ForumInfo.ParentForumName + ""); + sbOutput.Replace(oldValue: "[PARENTFORUMLINK]", "" + ForumInfo.ParentForumName + ""); else sbOutput.Replace("[PARENTFORUMLINK]", "" + ForumInfo.ParentForumName + ""); } diff --git a/Dnn.CommunityForums/CustomControls/UserControls/TopicsView.cs b/Dnn.CommunityForums/CustomControls/UserControls/TopicsView.cs index 04e19cbd..b1919073 100644 --- a/Dnn.CommunityForums/CustomControls/UserControls/TopicsView.cs +++ b/Dnn.CommunityForums/CustomControls/UserControls/TopicsView.cs @@ -668,7 +668,6 @@ private string ParseTopics(string Template, DataTable Topics, string Section) string MemberListMode = MainSettings.MemberListMode; var ProfileVisibility = MainSettings.ProfileVisibility; string UserNameDisplay = MainSettings.UserNameDisplay; - bool DisableUserProfiles = false; string sLastReply = TemplateUtils.GetTemplateSection(sOutput, "[LASTPOST]", "[/LASTPOST]"); int iLength = 0; if (sLastReply.Contains("[LASTPOSTSUBJECT:")) diff --git a/Dnn.CommunityForums/CustomControls/UserControls/WhatsNewRSS.cs b/Dnn.CommunityForums/CustomControls/UserControls/WhatsNewRSS.cs index 8a584f1d..922ef26d 100644 --- a/Dnn.CommunityForums/CustomControls/UserControls/WhatsNewRSS.cs +++ b/Dnn.CommunityForums/CustomControls/UserControls/WhatsNewRSS.cs @@ -217,7 +217,6 @@ private string BuildRSS() { const int indent = 2; - var counter = 0; var sb = new StringBuilder(1024); diff --git a/Dnn.CommunityForums/Deprecated/Cache.cs b/Dnn.CommunityForums/Deprecated/Cache.cs index 07686f99..230d0982 100644 --- a/Dnn.CommunityForums/Deprecated/Cache.cs +++ b/Dnn.CommunityForums/Deprecated/Cache.cs @@ -29,7 +29,7 @@ public partial class DataCache [Obsolete("Deprecated in Community Forums. Scheduled removal in 09.00.00. Use SettingsCacheStore(int ModuleId, string cacheKey, object cacheObj) or ContentCacheStore(int ModuleId, string cacheKey, object cacheObj)")] public static bool CacheStore(string cacheKey, object cacheObj) { - SettingsCacheStore(-1, cacheKey, cacheObj, DateTime.UtcNow.AddMinutes(settingsCacheTime)); + SettingsCacheStore(-1, cacheKey, cacheObj, DateTime.UtcNow.AddMinutes(settingsCacheMinutes)); return true; } [Obsolete("Deprecated in Community Forums. Scheduled removal in 09.00.00. Use SettingsCacheStore(int ModuleId, string cacheKey, object cacheObj, DateTime Expiration) or ContentCacheStore(int ModuleId, string cacheKey, object cacheObj, DateTime Expiration)")] diff --git a/Dnn.CommunityForums/Deprecated/Utilities.cs b/Dnn.CommunityForums/Deprecated/Utilities.cs index 02ac130f..0bcdb237 100644 --- a/Dnn.CommunityForums/Deprecated/Utilities.cs +++ b/Dnn.CommunityForums/Deprecated/Utilities.cs @@ -84,10 +84,10 @@ internal static string ParseSecurityTokens(string template, string userRoles) return template; } - [Obsolete("Deprecated in Community Forums. Removed in 10.00.00. Not Used.")] /// /// Calculates a friendly display string based on an input timespan /// + [Obsolete("Deprecated in Community Forums. Removed in 10.00.00. Not Used.")] public static string HumanFriendlyDate(DateTime displayDate, int ModuleId, int timeZoneOffset) { var newDate = displayDate.AddMinutes( timeZoneOffset); diff --git a/Dnn.CommunityForums/DnnCommunityForums.csproj b/Dnn.CommunityForums/DnnCommunityForums.csproj index 310c254c..2be1bc11 100644 --- a/Dnn.CommunityForums/DnnCommunityForums.csproj +++ b/Dnn.CommunityForums/DnnCommunityForums.csproj @@ -1,2083 +1,2061 @@  - - - 8.0.30703 - 2.0 - {2D42BCCC-D1B2-4831-B80C-41199DE25798} - Debug - AnyCPU - DotNetNuke.Modules.ActiveForums - Library - Properties - DotNetNuke.Modules.ActiveForums - 4.0 - v4.7.2 - - - - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - SAK - SAK - SAK - SAK - - - - - bin\ - bin\DotNetNuke.Modules.ActiveForums.xml - TRACE;DEBUG; - true - false - 1 - 3 - full - AllRules.ruleset - true - false - - - bin\ - bin\DotNetNuke.Modules.ActiveForums.xml - TRACE; - false - true - 4 - none - AllRules.ruleset - false - - - - ..\packages\DotNetNuke.Core.9.9.0\lib\net45\DotNetNuke.dll - - - ..\packages\DotNetNuke.Abstractions.9.9.0\lib\netstandard2.0\DotNetNuke.Abstractions.dll - - - ..\packages\DotNetNuke.DependencyInjection.9.9.0\lib\netstandard2.0\DotNetNuke.DependencyInjection.dll - - - ..\packages\DotNetNuke.Instrumentation.9.9.0\lib\net45\DotNetNuke.Instrumentation.dll - - - ..\packages\DotNetNuke.Instrumentation.9.9.0\lib\net45\DotNetNuke.log4net.dll - - - ..\packages\DotNetNuke.Web.9.9.0\lib\net45\DotNetNuke.Web.dll - - - ..\packages\DotNetNuke.Web.Client.9.9.0\lib\net45\DotNetNuke.Web.Client.dll - - - ..\packages\DotNetNuke.Web.9.9.0\lib\net45\DotNetNuke.WebUtility.dll - - - ..\packages\DotNetNuke.Core.9.9.0\lib\net45\Microsoft.ApplicationBlocks.Data.dll - - - - packages\Microsoft.Extensions.DependencyInjection.2.1.1\lib\net461\Microsoft.Extensions.DependencyInjection.dll - - - packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - ..\packages\Microsoft.Extensions.DependencyInjection.2.1.1\lib\net461\Microsoft.Extensions.DependencyInjection.dll - - - False - ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - - - ..\packages\microsoft-web-helpers.2.1.20710.2\lib\net40\Microsoft.Web.Helpers.dll - - - ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll - - - System - - - - System.Data - - - - System.Design - - - System.Drawing - - - - - - False - ReferencedAssemblies\System.Net.Http.Formatting.dll - False - - - - - - - - System.Web - - - - - ..\packages\Microsoft.AspNet.WebPages.2.0.20505.0\lib\net40\System.Web.Helpers.dll - - - False - ReferencedAssemblies\System.Web.Http.dll - False - - - ..\packages\Microsoft.AspNet.Razor.3.0.0\lib\net45\System.Web.Razor.dll - - - - - - ..\packages\Microsoft.AspNet.WebPages.2.0.20505.0\lib\net40\System.Web.WebPages.dll - - - ..\packages\Microsoft.AspNet.WebPages.2.0.20505.0\lib\net40\System.Web.WebPages.Deployment.dll - - - ..\packages\Microsoft.AspNet.WebPages.2.0.20505.0\lib\net40\System.Web.WebPages.Razor.dll - - - System.XML - - - - ..\packages\Microsoft.AspNet.WebPages.Data.3.0.0\lib\net45\WebMatrix.Data.dll - - - ..\packages\Microsoft.AspNet.WebPages.WebData.2.0.20505.0\lib\net40\WebMatrix.WebData.dll - - - - - - - - - - - - - - - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - - - - - - - ASPXCodeBehind - - - - Designer - Always - - - Designer - - - Designer - - - Designer - - - - - - - - - - - - - - - - - - - - - - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - - - - - - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - - - Designer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ASPXCodeBehind - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - - - - ASPXCodeBehind - - - - - - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - - - - ASPXCodeBehind - - - - ASPXCodeBehind - - - - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - - - Form - - - ASPXCodeBehind - - - - - ASPXCodeBehind - - - - - Form - - - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - - - - - - - - - - - - - - - - - - - - - - - Designer - - - Designer - - - Designer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Designer - - - ASPXCodeBehind - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ASPXCodeBehind - - - ASPXCodeBehind - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - profile_mysubscriptions.ascx - ASPXCodeBehind - - - profile_mysubscriptions.ascx - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - af_modban.ascx - ASPXCodeBehind - - - af_modban.ascx - - - - af_topicscripts.ascx - ASPXCodeBehind - - - af_topicscripts.ascx - - - af_searchadvanced.ascx - ASPXCodeBehind - - - af_searchadvanced.ascx - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ASPXCodeBehind - - - - - ActiveForums.ascx - - - ActiveForums.ascx - ASPXCodeBehind - - - ActiveForumViewer.ascx - - - ActiveForumViewer.ascx - ASPXCodeBehind - - - ActiveForumViewerSettings.ascx - - - ActiveForumViewerSettings.ascx - ASPXCodeBehind - - - Classic.ascx - - - Classic.ascx - ASPXCodeBehind - - - - ASPXCodeBehind - - - - - - - - ASPXCodeBehind - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - admin_properties.ascx - - - admin_properties.ascx - ASPXCodeBehind - - - admin_securitygrid.ascx - - - admin_securitygrid.ascx - ASPXCodeBehind - - - af_attach.ascx - - - af_attach.ascx - ASPXCodeBehind - - - - - - - - - - - - - - - - - - - - ASPXCodeBehind - - - ASPXCodeBehind - - - - - - ASPXCodeBehind - - - - - - ASPXCodeBehind - - - ASPXCodeBehind - - - af_polls.ascx - - - af_polls.ascx - ASPXCodeBehind - - - af_pollvote.ascx - - - af_pollvote.ascx - ASPXCodeBehind - - - af_sendto.ascx - - - af_sendto.ascx - ASPXCodeBehind - - - profile_adminsettings.ascx - - - profile_adminsettings.ascx - ASPXCodeBehind - - - profile_mypreferences.ascx - - - profile_mypreferences.ascx - ASPXCodeBehind - - - - - - ASPXCodeBehind - - - - - - ASPXCodeBehind - - - ASPXCodeBehind - - - - ASPXCodeBehind - - - - - ASPXCodeBehind - - - ASPXCodeBehind - - - - - - - ASPXCodeBehind - - - - - ASPXCodeBehind - - - adminhelper.ashx - - - forumhelper.ashx - - - - - - - - ForumSettings.ascx - - - ForumSettings.ascx - ASPXCodeBehind - - - WhatsNew.ascx - - - WhatsNew.ascx - ASPXCodeBehind - - - WhatsNewOptions.ascx - - - WhatsNewOptions.ascx - ASPXCodeBehind - - - - - - - - admin_categories.ascx - - - admin_categories.ascx - ASPXCodeBehind - - - admin_filters.ascx - - - admin_filters.ascx - ASPXCodeBehind - - - admin_home.ascx - - - admin_home.ascx - ASPXCodeBehind - - - admin_manageforums_home.ascx - - - admin_manageforums_home.ascx - ASPXCodeBehind - - - admin_ranks.ascx - - - admin_ranks.ascx - ASPXCodeBehind - - - admin_tags.ascx - - - admin_tags.ascx - ASPXCodeBehind - - - admin_templates.ascx - - - admin_templates.ascx - ASPXCodeBehind - - - admin_templates_edit.ascx - - - admin_templates_edit.ascx - ASPXCodeBehind - - - af_confirmaction.ascx - - - af_grid.ascx - - - af_grid.ascx - ASPXCodeBehind - - - af_members.ascx - - - af_members.ascx - ASPXCodeBehind - - - af_searchquick.ascx - - - af_modreport.ascx - - - af_modreport.ascx - ASPXCodeBehind - - - af_polledit.ascx - - - af_polledit.ascx - ASPXCodeBehind - - - af_search.ascx - - - af_search.ascx - ASPXCodeBehind - - - af_topicsort.ascx - - - af_topicsort.ascx - ASPXCodeBehind - - - af_topicstatus.ascx - - - af_topicstatus.ascx - ASPXCodeBehind - - - af_usersonline.ascx - - - af_usersonline.ascx - ASPXCodeBehind - - - af_post.ascx - - - af_post.ascx - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - - - Code - - - - - - - ControlPanel.ascx - - - ControlPanel.ascx - ASPXCodeBehind - - - admin_manageforums.ascx - - - admin_manageforums.ascx - ASPXCodeBehind - - - admin_manageforums_forumeditor.ascx - - - admin_manageforums_forumeditor.ascx - ASPXCodeBehind - - - af_confirmaction.ascx - ASPXCodeBehind - - - af_markallread.ascx - - - af_modtopics.ascx - - - af_modtopics.ascx - ASPXCodeBehind - - - af_posticonlist.ascx - - - af_posticonlist.ascx - ASPXCodeBehind - - - af_profile.ascx - - - af_profile.ascx - ASPXCodeBehind - - - af_quickjump.ascx - - - af_quickjump.ascx - ASPXCodeBehind - - - af_quickreply.ascx - - - af_subscribe.ascx - - - af_subscribe.ascx - ASPXCodeBehind - - - af_topicrating.ascx - - - af_topicrating.ascx - ASPXCodeBehind - - - Code - - - Code - - - Code - - - Code - - - Code - - - ASPXCodeBehind - - - Code - - - Code - - - Code - - - - ASPXCodeBehind - - - Code - - - Code - - - Code - - - af_markallread.ascx - ASPXCodeBehind - - - af_searchquick.ascx - ASPXCodeBehind - - - af_quickreply.ascx - ASPXCodeBehind - - - _default.ascx - - - _default.ascx - ASPXCodeBehind - - - ASPXCodeBehind - - - - - ASPXCodeBehind - - - ASPXCodeBehind - - - ASPXCodeBehind - - - af_modsplittopic.ascx - - - af_modsplittopic.ascx - ASPXCodeBehind - - - feeds.aspx - ASPXCodeBehind - - - viewer.aspx - ASPXCodeBehind - - - feeds.aspx.cs - Designer - - - - - viewer.aspx.cs - Designer - - - Designer - - - - Designer - Always - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - - - + + + 8.0.30703 + 2.0 + {2D42BCCC-D1B2-4831-B80C-41199DE25798} + Debug + AnyCPU + DotNetNuke.Modules.ActiveForums + Library + Properties + DotNetNuke.Modules.ActiveForums + 4.0 + v4.7.2 + + + + + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + SAK + SAK + SAK + SAK + + + + + bin\ + bin\DotNetNuke.Modules.ActiveForums.xml + TRACE;DEBUG; + true + false + 1 + 3 + full + AllRules.ruleset + true + false + + + bin\ + bin\DotNetNuke.Modules.ActiveForums.xml + TRACE; + false + true + 4 + none + AllRules.ruleset + false + + + + ..\packages\DotNetNuke.Core.9.9.0\lib\net45\DotNetNuke.dll + + + ..\packages\DotNetNuke.Abstractions.9.9.0\lib\netstandard2.0\DotNetNuke.Abstractions.dll + + + ..\packages\DotNetNuke.DependencyInjection.9.9.0\lib\netstandard2.0\DotNetNuke.DependencyInjection.dll + + + ..\packages\DotNetNuke.Instrumentation.9.9.0\lib\net45\DotNetNuke.Instrumentation.dll + + + ..\packages\DotNetNuke.Instrumentation.9.9.0\lib\net45\DotNetNuke.log4net.dll + + + ..\packages\DotNetNuke.Web.9.9.0\lib\net45\DotNetNuke.Web.dll + + + ..\packages\DotNetNuke.Web.Client.9.9.0\lib\net45\DotNetNuke.Web.Client.dll + + + ..\packages\DotNetNuke.Web.9.9.0\lib\net45\DotNetNuke.WebUtility.dll + + + ..\packages\DotNetNuke.Core.9.9.0\lib\net45\Microsoft.ApplicationBlocks.Data.dll + + + + packages\Microsoft.Extensions.DependencyInjection.2.1.1\lib\net461\Microsoft.Extensions.DependencyInjection.dll + + + packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll + ..\packages\Microsoft.Extensions.DependencyInjection.2.1.1\lib\net461\Microsoft.Extensions.DependencyInjection.dll + + + False + ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll + + + ..\packages\microsoft-web-helpers.2.1.20710.2\lib\net40\Microsoft.Web.Helpers.dll + + + ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll + + + System + + + + System.Data + + + + System.Design + + + System.Drawing + + + + + + False + ReferencedAssemblies\System.Net.Http.Formatting.dll + False + + + + + + + + System.Web + + + + + ..\packages\Microsoft.AspNet.WebPages.2.0.20505.0\lib\net40\System.Web.Helpers.dll + + + False + ReferencedAssemblies\System.Web.Http.dll + False + + + ..\packages\Microsoft.AspNet.Razor.3.0.0\lib\net45\System.Web.Razor.dll + + + + + + ..\packages\Microsoft.AspNet.WebPages.2.0.20505.0\lib\net40\System.Web.WebPages.dll + + + ..\packages\Microsoft.AspNet.WebPages.2.0.20505.0\lib\net40\System.Web.WebPages.Deployment.dll + + + ..\packages\Microsoft.AspNet.WebPages.2.0.20505.0\lib\net40\System.Web.WebPages.Razor.dll + + + System.XML + + + + ..\packages\Microsoft.AspNet.WebPages.Data.3.0.0\lib\net45\WebMatrix.Data.dll + + + ..\packages\Microsoft.AspNet.WebPages.WebData.2.0.20505.0\lib\net40\WebMatrix.WebData.dll + + + + + + + + + + + + + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + + + + + ASPXCodeBehind + + + + Designer + Always + + + Designer + + + Designer + + + Designer + + + + + + + + + + + + + + + + + + + + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + Designer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ASPXCodeBehind + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + + ASPXCodeBehind + + + + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + + ASPXCodeBehind + + + + ASPXCodeBehind + + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + Form + + + ASPXCodeBehind + + + + + ASPXCodeBehind + + + + + Form + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + + + + + + + + + + + + + + + + + + + + + Designer + + + Designer + + + Designer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Designer + + + ASPXCodeBehind + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ASPXCodeBehind + + + ASPXCodeBehind + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + profile_mysubscriptions.ascx + ASPXCodeBehind + + + profile_mysubscriptions.ascx + + + + + + + + + + + + + + + + + + + + + + af_modban.ascx + ASPXCodeBehind + + + af_modban.ascx + + + + af_topicscripts.ascx + ASPXCodeBehind + + + af_topicscripts.ascx + + + af_searchadvanced.ascx + ASPXCodeBehind + + + af_searchadvanced.ascx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ASPXCodeBehind + + + + + ActiveForums.ascx + + + ActiveForums.ascx + ASPXCodeBehind + + + ActiveForumViewer.ascx + + + ActiveForumViewer.ascx + ASPXCodeBehind + + + ActiveForumViewerSettings.ascx + + + ActiveForumViewerSettings.ascx + ASPXCodeBehind + + + Classic.ascx + + + Classic.ascx + ASPXCodeBehind + + + + ASPXCodeBehind + + + + + + + + ASPXCodeBehind + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + admin_properties.ascx + + + admin_properties.ascx + ASPXCodeBehind + + + admin_securitygrid.ascx + + + admin_securitygrid.ascx + ASPXCodeBehind + + + af_attach.ascx + + + af_attach.ascx + ASPXCodeBehind + + + + + + + + + + + + + + + + + + + + ASPXCodeBehind + + + ASPXCodeBehind + + + + + + ASPXCodeBehind + + + + + + ASPXCodeBehind + + + ASPXCodeBehind + + + af_polls.ascx + + + af_polls.ascx + ASPXCodeBehind + + + af_pollvote.ascx + + + af_pollvote.ascx + ASPXCodeBehind + + + af_sendto.ascx + + + af_sendto.ascx + ASPXCodeBehind + + + profile_adminsettings.ascx + + + profile_adminsettings.ascx + ASPXCodeBehind + + + profile_mypreferences.ascx + + + profile_mypreferences.ascx + ASPXCodeBehind + + + + + + ASPXCodeBehind + + + + + + ASPXCodeBehind + + + ASPXCodeBehind + + + + ASPXCodeBehind + + + + + ASPXCodeBehind + + + ASPXCodeBehind + + + + + + + ASPXCodeBehind + + + + + ASPXCodeBehind + + + adminhelper.ashx + + + forumhelper.ashx + + + + + + + + ForumSettings.ascx + + + ForumSettings.ascx + ASPXCodeBehind + + + WhatsNew.ascx + + + WhatsNew.ascx + ASPXCodeBehind + + + WhatsNewOptions.ascx + + + WhatsNewOptions.ascx + ASPXCodeBehind + + + + + + + admin_categories.ascx + + + admin_categories.ascx + ASPXCodeBehind + + + admin_filters.ascx + + + admin_filters.ascx + ASPXCodeBehind + + + admin_home.ascx + + + admin_home.ascx + ASPXCodeBehind + + + admin_manageforums_home.ascx + + + admin_manageforums_home.ascx + ASPXCodeBehind + + + admin_ranks.ascx + + + admin_ranks.ascx + ASPXCodeBehind + + + admin_tags.ascx + + + admin_tags.ascx + ASPXCodeBehind + + + admin_templates.ascx + + + admin_templates.ascx + ASPXCodeBehind + + + admin_templates_edit.ascx + + + admin_templates_edit.ascx + ASPXCodeBehind + + + af_confirmaction.ascx + + + af_grid.ascx + + + af_grid.ascx + ASPXCodeBehind + + + af_members.ascx + + + af_members.ascx + ASPXCodeBehind + + + af_searchquick.ascx + + + af_modreport.ascx + + + af_modreport.ascx + ASPXCodeBehind + + + af_polledit.ascx + + + af_polledit.ascx + ASPXCodeBehind + + + af_search.ascx + + + af_search.ascx + ASPXCodeBehind + + + af_topicsort.ascx + + + af_topicsort.ascx + ASPXCodeBehind + + + af_topicstatus.ascx + + + af_topicstatus.ascx + ASPXCodeBehind + + + af_usersonline.ascx + + + af_usersonline.ascx + ASPXCodeBehind + + + af_post.ascx + + + af_post.ascx + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + Code + + + + + + + ControlPanel.ascx + + + ControlPanel.ascx + ASPXCodeBehind + + + admin_manageforums.ascx + + + admin_manageforums.ascx + ASPXCodeBehind + + + admin_manageforums_forumeditor.ascx + + + admin_manageforums_forumeditor.ascx + ASPXCodeBehind + + + af_confirmaction.ascx + ASPXCodeBehind + + + af_markallread.ascx + + + af_modtopics.ascx + + + af_modtopics.ascx + ASPXCodeBehind + + + af_posticonlist.ascx + + + af_posticonlist.ascx + ASPXCodeBehind + + + af_profile.ascx + + + af_profile.ascx + ASPXCodeBehind + + + af_quickjump.ascx + + + af_quickjump.ascx + ASPXCodeBehind + + + af_quickreply.ascx + + + af_subscribe.ascx + + + af_subscribe.ascx + ASPXCodeBehind + + + af_topicrating.ascx + + + af_topicrating.ascx + ASPXCodeBehind + + + Code + + + Code + + + Code + + + Code + + + Code + + + ASPXCodeBehind + + + Code + + + Code + + + Code + + + + ASPXCodeBehind + + + Code + + + Code + + + Code + + + af_markallread.ascx + ASPXCodeBehind + + + af_searchquick.ascx + ASPXCodeBehind + + + af_quickreply.ascx + ASPXCodeBehind + + + _default.ascx + + + _default.ascx + ASPXCodeBehind + + + ASPXCodeBehind + + + + + ASPXCodeBehind + + + ASPXCodeBehind + + + ASPXCodeBehind + + + af_modsplittopic.ascx + + + af_modsplittopic.ascx + ASPXCodeBehind + + + feeds.aspx + ASPXCodeBehind + + + viewer.aspx + ASPXCodeBehind + + + feeds.aspx.cs + Designer + + + + + viewer.aspx.cs + Designer + + + Designer + + + + Designer + Always + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + + \ No newline at end of file diff --git a/Dnn.CommunityForums/Entities/ForumInfo.cs b/Dnn.CommunityForums/Entities/ForumInfo.cs index 76795a2e..4af8d176 100644 --- a/Dnn.CommunityForums/Entities/ForumInfo.cs +++ b/Dnn.CommunityForums/Entities/ForumInfo.cs @@ -335,10 +335,10 @@ public TrustTypes DefaultTrustValue [IgnoreColumn()] public int CreatePostCount => Utilities.SafeConvertInt(ForumSettings[ForumSettingKeys.CreatePostCount]); - [IgnoreColumn()] /// /// Minimum posts required to reply to a topic in this forum if the user is not trusted /// + [IgnoreColumn()] public int ReplyPostCount => Utilities.SafeConvertInt(ForumSettings[ForumSettingKeys.ReplyPostCount]); [Obsolete("Deprecated in Community Forums. Scheduled for removal in 10.00.00. Not Used.")] diff --git a/Dnn.CommunityForums/ForumSettings.ascx.cs b/Dnn.CommunityForums/ForumSettings.ascx.cs index 9000efcb..d57316aa 100644 --- a/Dnn.CommunityForums/ForumSettings.ascx.cs +++ b/Dnn.CommunityForums/ForumSettings.ascx.cs @@ -398,12 +398,7 @@ private void BindForumGroups() dt.Load(dr); dr.Close(); - int totalGroupForum = 0; string tmpGroup = string.Empty; - int i = 0; - int groupCount = 0; - int forumCount = 0; - bool hasChildren = false; foreach (DataRow row in dt.Rows) { if (tmpGroup != row["ForumGroupId"].ToString()) diff --git a/Dnn.CommunityForums/Providers/DataProviders/SqlDataProvider/SqlDataProvider.cs b/Dnn.CommunityForums/Providers/DataProviders/SqlDataProvider/SqlDataProvider.cs index 28ad9791..b2f2bb08 100644 --- a/Dnn.CommunityForums/Providers/DataProviders/SqlDataProvider/SqlDataProvider.cs +++ b/Dnn.CommunityForums/Providers/DataProviders/SqlDataProvider/SqlDataProvider.cs @@ -394,6 +394,7 @@ public override void Settings_Save(int ModuleId, string GroupKey, string Setting } #endregion #region Subscriptions + [Obsolete("Deprecated in Community Forums. Removed in 10.00.00. No longer used.")] public override int Subscriptions_IsSubscribed(int PortalId, int ModuleId, int ForumId, int TopicId, int Mode, int UserId) { return Convert.ToInt32(SqlHelper.ExecuteScalar(ConnectionString, DatabaseOwner + ObjectQualifier + "activeforums_Subscriptions_IsSubscribed", PortalId, ModuleId, ForumId, TopicId, Mode, UserId)); @@ -418,7 +419,6 @@ public override void Tags_Delete(int PortalId, int ModuleId, int TagId) { SqlHelper.ExecuteNonQuery(ConnectionString, DatabaseOwner + ObjectQualifier + "activeforums_Tags_Delete", PortalId, ModuleId, TagId, -1); } - [Obsolete("Deprecated in Community Forums. Removed in 10.00.00. No longer used.")] public override void Tags_DeleteByTopicId(int PortalId, int ModuleId, int TopicId) { SqlHelper.ExecuteNonQuery(ConnectionString, DatabaseOwner + ObjectQualifier + "activeforums_Tags_Delete", PortalId, ModuleId, -1, TopicId); diff --git a/Dnn.CommunityForums/Services/AdminServiceController.cs b/Dnn.CommunityForums/Services/AdminServiceController.cs index c1011dd0..d2a6adb7 100644 --- a/Dnn.CommunityForums/Services/AdminServiceController.cs +++ b/Dnn.CommunityForums/Services/AdminServiceController.cs @@ -149,7 +149,6 @@ public class ToggleSecurityDTO [HttpPost] public HttpResponseMessage ToggleSecurity(ToggleSecurityDTO dto) { - var pc = new DotNetNuke.Modules.ActiveForums.Controllers.PermissionController(); switch (dto.Action) { case "delete": diff --git a/Dnn.CommunityForums/Services/Controllers/ForumController.cs b/Dnn.CommunityForums/Services/Controllers/ForumController.cs index 8ed68b64..ff68b434 100644 --- a/Dnn.CommunityForums/Services/Controllers/ForumController.cs +++ b/Dnn.CommunityForums/Services/Controllers/ForumController.cs @@ -105,7 +105,7 @@ public HttpResponseMessage SubscriberCountString(int ForumId) public HttpResponseMessage ListForHtml(ForumDto dto) { DotNetNuke.Modules.ActiveForums.User user = new DotNetNuke.Modules.ActiveForums.UserController().LoadUser(UserInfo); - return Request.CreateResponse(HttpStatusCode.OK, new DotNetNuke.Modules.ActiveForums.ForumController().GetForumsHtmlOption(ActiveModule.PortalID, ForumModuleId, user)); + return Request.CreateResponse(HttpStatusCode.OK, DotNetNuke.Modules.ActiveForums.Controllers.ForumController.GetForumsHtmlOption(ForumModuleId, user)); } } } \ No newline at end of file diff --git a/Dnn.CommunityForums/Services/Controllers/ReplyController.cs b/Dnn.CommunityForums/Services/Controllers/ReplyController.cs index 92fc50bc..953c159b 100644 --- a/Dnn.CommunityForums/Services/Controllers/ReplyController.cs +++ b/Dnn.CommunityForums/Services/Controllers/ReplyController.cs @@ -32,6 +32,7 @@ namespace DotNetNuke.Modules.ActiveForums.Services.Controllers /// public class ReplyController : ControllerBase { +#pragma warning disable CS1570 /// /// Marks a reply as the answer to a topic /// @@ -39,6 +40,7 @@ public class ReplyController : ControllerBase /// /// /// https://dnndev.me/API/ActiveForums/Reply/MarkAsAnswer?forumId=xxx&replyId=yyy +#pragma warning restore CS1570 [HttpPost] [DnnAuthorize] [ForumsAuthorize(SecureActions.ModEdit)] @@ -62,6 +64,7 @@ public HttpResponseMessage MarkAsAnswer(int forumId, int replyId) } return Request.CreateResponse(HttpStatusCode.BadRequest); } +#pragma warning disable CS1570 /// /// Deletes a Reply /// @@ -69,6 +72,7 @@ public HttpResponseMessage MarkAsAnswer(int forumId, int replyId) /// /// /// https://dnndev.me/API/ActiveForums/Reply/Delete?forumId=xxx&replyId=zzz +#pragma warning restore CS1570 [HttpDelete] [DnnAuthorize] [ForumsAuthorize(SecureActions.Delete)] diff --git a/Dnn.CommunityForums/Services/Controllers/TagController.cs b/Dnn.CommunityForums/Services/Controllers/TagController.cs index c3772d16..31c5bfb2 100644 --- a/Dnn.CommunityForums/Services/Controllers/TagController.cs +++ b/Dnn.CommunityForums/Services/Controllers/TagController.cs @@ -38,6 +38,7 @@ namespace DotNetNuke.Modules.ActiveForums.Services.Controllers public class TagController : ControllerBase { +#pragma warning disable CS1570 /// /// Gets Tags matching a string anywhere in string /// @@ -45,6 +46,7 @@ public class TagController : ControllerBase /// /// /// https://dnndev.me/API/ActiveForums/Tag/Matches?ForumId=xxx&MatchString=xxx +#pragma warning restore CS1570 [HttpGet] [DnnAuthorize] [ForumsAuthorize(SecureActions.Tag)] @@ -53,6 +55,7 @@ public HttpResponseMessage Matches(int ForumId, string MatchString) return Match($"%{CleanAndChopString(MatchString, 20)}%"); } +#pragma warning disable CS1570 /// /// Gets Tags with names matching string from beginning /// @@ -60,6 +63,7 @@ public HttpResponseMessage Matches(int ForumId, string MatchString) /// /// /// https://dnndev.me/API/ActiveForums/Tag/BeginsWith?ForumId=xxx&MatchString=xxx +#pragma warning restore CS1570 [HttpGet] [DnnAuthorize] [ForumsAuthorize(SecureActions.Tag)] diff --git a/Dnn.CommunityForums/Services/Controllers/TopicController.cs b/Dnn.CommunityForums/Services/Controllers/TopicController.cs index 45a33272..88115c9e 100644 --- a/Dnn.CommunityForums/Services/Controllers/TopicController.cs +++ b/Dnn.CommunityForums/Services/Controllers/TopicController.cs @@ -78,6 +78,7 @@ public HttpResponseMessage Subscribe(TopicDto1 dto) return Request.CreateResponse(HttpStatusCode.BadRequest); } +#pragma warning disable CS1570 /// /// Gets Subscriber count for a Topic /// @@ -85,6 +86,7 @@ public HttpResponseMessage Subscribe(TopicDto1 dto) /// /// /// https://dnndev.me/API/ActiveForums/Topic/SubscriberCount?ForumId=xxx&TopicId=xxx +#pragma warning restore CS1570 [HttpGet] [DnnAuthorize] public HttpResponseMessage SubscriberCount(int ForumId, int TopicId) @@ -99,6 +101,7 @@ public HttpResponseMessage SubscriberCount(int ForumId, int TopicId) return Request.CreateResponse(HttpStatusCode.BadRequest); } +#pragma warning disable CS1570 /// /// Gets Subscriber count string for a Topic /// @@ -106,6 +109,7 @@ public HttpResponseMessage SubscriberCount(int ForumId, int TopicId) /// /// /// https://dnndev.me/API/ActiveForums/Forum/SubscriberCountString?ForumId=xxx&TopicId=xxx +#pragma warning restore CS1570 [HttpGet] [DnnAuthorize] public HttpResponseMessage SubscriberCountString(int ForumId, int TopicId) @@ -198,12 +202,14 @@ public HttpResponseMessage Move(TopicDto1 dto) } return Request.CreateResponse(HttpStatusCode.NotFound); } +#pragma warning disable CS1570 /// /// Loads a Topic /// /// /// /// https://dnndev.me/API/ActiveForums/Topic/Load?ForumId=xxx&TopicId=xxx +#pragma warning restore CS1570 [HttpGet] [DnnAuthorize] [ForumsAuthorize(SecureActions.Read)] @@ -230,6 +236,7 @@ public HttpResponseMessage Load(int ForumId, int TopicId) } return Request.CreateResponse(HttpStatusCode.BadRequest); } +#pragma warning disable CS1570 /// /// Deletes a Topic /// @@ -237,6 +244,7 @@ public HttpResponseMessage Load(int ForumId, int TopicId) /// /// /// https://dnndev.me/API/ActiveForums/Topic/Delete?forumId=xxx&topicId=yyy +#pragma warning restore CS1570 [HttpDelete] [DnnAuthorize] [ForumsAuthorize(SecureActions.Delete)] diff --git a/Dnn.CommunityForums/Services/ModerationService.cs b/Dnn.CommunityForums/Services/ModerationService.cs index 1414c03f..7327b81a 100644 --- a/Dnn.CommunityForums/Services/ModerationService.cs +++ b/Dnn.CommunityForums/Services/ModerationService.cs @@ -105,7 +105,6 @@ public HttpResponseMessage RejectPost(ModerationDTO dto) } else { - var tc = new TopicsController(); var topic = new DotNetNuke.Modules.ActiveForums.Controllers.TopicController().GetById(_topicId); if (topic == null) return Request.CreateResponse(HttpStatusCode.OK, new { Message = "Topic Not Found" }); @@ -166,7 +165,6 @@ public HttpResponseMessage DeletePost(ModerationDTO dto) } else { - var tc = new TopicsController(); var ti = new DotNetNuke.Modules.ActiveForums.Controllers.TopicController().GetById(_topicId); if (ti == null) return Request.CreateResponse(HttpStatusCode.OK, new { Message = "Topic Not Found" }); diff --git a/Dnn.CommunityForums/class/Cache.cs b/Dnn.CommunityForums/class/Cache.cs index fb78b793..d1ec0cfe 100644 --- a/Dnn.CommunityForums/class/Cache.cs +++ b/Dnn.CommunityForums/class/Cache.cs @@ -26,12 +26,21 @@ namespace DotNetNuke.Modules.ActiveForums { public partial class DataCache { - private static int settingsCacheTime = 10; + private static int settingsCacheMinutes = 10; + private static int contentCacheMinutes = 2; public static bool IsContentCachingEnabledForModule(int ModuleId) { + return true; + + #region "Do not delete this code" + + /* DNN module caching uses "output caching" which doesn't work correctly with this module; in particular, CSS files are not referenced */ + /* Until this is resolved, content caching for this module is always enabled, for 2 minutes */ + /* Track whether caching is being used at all in this module; this setting itself is cached to avoid repeated module lookups; so it is stored/retrieved directly using DNN API rather than local APIs since if caching is disabled would never return the correct value for this setting */ + /* if (ModuleId < 0) { return true; @@ -47,12 +56,23 @@ public static bool IsContentCachingEnabledForModule(int ModuleId) } return (bool)IsCachingEnabledForModule; } + */ + #endregion } public static int ContentCachingTime(int ModuleId) { + return contentCacheMinutes; + + #region "Do not delete this code" + /* DNN module caching uses "output caching" which doesn't work correctly with this module; in particular, CSS files are not referenced */ + /* Until this is resolved, content caching for this module is always enabled, for 2 minutes */ + + /* DNN module caching uses "output caching" which doesn't work correctly with this module; in particular, CSS files are not referenced */ /* Track caching being used for this module; this setting itself is cached to avoid repeated module lookups; so it is stored/retrieved directly using DNN API rather than local APIs since if caching is disabled would never return the correct value for this setting */ + + /* if (ModuleId < 0) { return 0; @@ -69,15 +89,17 @@ public static int ContentCachingTime(int ModuleId) if (CachingTime == null) { CachingTime = new DotNetNuke.Entities.Modules.ModuleController().GetModule(ModuleId).CacheTime; - DotNetNuke.Common.Utilities.DataCache.SetCache(string.Format(CacheKeys.CachingTime, ModuleId), CachingTime, DateTime.UtcNow.AddMinutes(settingsCacheTime)); + DotNetNuke.Common.Utilities.DataCache.SetCache(string.Format(CacheKeys.CachingTime, ModuleId), CachingTime, DateTime.UtcNow.AddMinutes(settingsCacheMinutes)); } return (int)CachingTime; } } + */ + #endregion } public static void SettingsCacheStore(int ModuleId, string cacheKey, object cacheObj) { - SettingsCacheStore(ModuleId, cacheKey, cacheObj, DateTime.UtcNow.AddMinutes(settingsCacheTime)); + SettingsCacheStore(ModuleId, cacheKey, cacheObj, DateTime.UtcNow.AddMinutes(settingsCacheMinutes)); } public static void ContentCacheStore(int ModuleId, string cacheKey, object cacheObj) { diff --git a/Dnn.CommunityForums/class/DataProvider.cs b/Dnn.CommunityForums/class/DataProvider.cs index 107ce2c4..dad16fb3 100644 --- a/Dnn.CommunityForums/class/DataProvider.cs +++ b/Dnn.CommunityForums/class/DataProvider.cs @@ -171,7 +171,6 @@ public static new DataProvider Instance() #region Tags [Obsolete("Deprecated in Community Forums. Removed in 10.00.00. No longer used.")] public abstract void Tags_Delete(int PortalId, int ModuleId, int TagId); - [Obsolete("Deprecated in Community Forums. Removed in 10.00.00. No longer used.")] public abstract void Tags_DeleteByTopicId(int PortalId, int ModuleId, int TopicId); [Obsolete("Deprecated in Community Forums. Removed in 10.00.00. No longer used.")] public abstract IDataReader Tags_Get(int PortalId, int ModuleId, int TagId); diff --git a/Dnn.CommunityForums/class/ForumController.cs b/Dnn.CommunityForums/class/ForumController.cs index 1d918989..4bab5762 100644 --- a/Dnn.CommunityForums/class/ForumController.cs +++ b/Dnn.CommunityForums/class/ForumController.cs @@ -39,30 +39,7 @@ public partial class ForumController [Obsolete("Deprecated in Community Forums. Removed in 10.00.00. Use DotNetNuke.Modules.ActiveForums.Controllers.ForumController.CreateGroupForum.")] public int CreateGroupForum(int portalId, int moduleId, int socialGroupId, int forumGroupId, string forumName, string forumDescription, bool isPrivate, string forumConfig) => DotNetNuke.Modules.ActiveForums.Controllers.ForumController.CreateSocialGroupForum(portalId, moduleId, socialGroupId, forumGroupId, forumName, forumDescription, isPrivate, forumConfig); [Obsolete("Deprecated in Community Forums. Removed in 10.00.00. Use DotNetNuke.Modules.ActiveForums.Controllers.ForumController.IterateForumsList().")] - public string GetForumsHtmlOption(int portalId, int moduleId, User currentUser) - { - var sb = new StringBuilder(); - int index = 1; - var forums = new DotNetNuke.Modules.ActiveForums.Controllers.ForumController().GetForums(moduleId).Where(f => !f.Hidden && !f.ForumGroup.Hidden && (currentUser.IsSuperUser || DotNetNuke.Modules.ActiveForums.Controllers.PermissionController.HasPerm(f.Security.View, currentUser.UserRoles))); - DotNetNuke.Modules.ActiveForums.Controllers.ForumController.IterateForumsList(forums.ToList(), currentUser, - fi => - { - sb.AppendFormat("", "-1", fi.GroupName); - index += 1; - }, - fi => - { - sb.AppendFormat("", fi.ForumID.ToString(), "--" + fi.ForumName); - index += 1; - }, - fi => - { - sb.AppendFormat("", fi.ForumID.ToString(), fi.ForumName); - index += 1; - } - ); - return sb.ToString(); - } + public string GetForumsHtmlOption(int portalId, int moduleId, User currentUser) => DotNetNuke.Modules.ActiveForums.Controllers.ForumController.GetForumsHtmlOption(moduleId, currentUser); [Obsolete("Deprecated in Community Forums. Removed in 10.00.00. Use DotNetNuke.Modules.ActiveForums.Controllers.ForumController.Forums_Save.")] public int Forums_Save(int portalId, DotNetNuke.Modules.ActiveForums.Entities.ForumInfo fi, bool isNew, bool useGroup) => new DotNetNuke.Modules.ActiveForums.Controllers.ForumController().Forums_Save(portalId, fi, isNew, useGroup, useGroup); [Obsolete("Deprecated in Community Forums. Removed in 10.00.00. Use DotNetNuke.Modules.ActiveForums.Controllers.ForumController.GetForumIdsBySocialGroup.")] diff --git a/Dnn.CommunityForums/class/Subscriptions.cs b/Dnn.CommunityForums/class/Subscriptions.cs index 4662ff9f..3412a5c0 100644 --- a/Dnn.CommunityForums/class/Subscriptions.cs +++ b/Dnn.CommunityForums/class/Subscriptions.cs @@ -44,7 +44,8 @@ public class SubscriptionInfo : DotNetNuke.Modules.ActiveForums.Entities.Subscri } public class SubscriptionController - { + { + //TODO: move to new DAL2 subscription controller public int Subscription_Update(int PortalId, int ModuleId, int ForumId, int TopicId, int Mode, int UserId, string UserRoles = "") { if (UserId == -1) @@ -69,6 +70,7 @@ public int Subscription_Update(int PortalId, int ModuleId, int ForumId, int Topi return -1; } + //TODO: move to new DAL2 subscription controller public List Subscription_GetSubscribers(int PortalId, int ForumId, int TopicId, SubscriptionTypes Mode, int AuthorId, string CanSubscribe) { DotNetNuke.Modules.ActiveForums.Entities.SubscriptionInfo si; @@ -98,27 +100,30 @@ public List Subscript } public abstract class Subscriptions { - [Obsolete("Deprecated in Community Forums. Removed in 10.00.00. Use DotNetNuke.Modules.ActiveForums.Controllers.SubscriptionController.")] + [Obsolete("Deprecated in Community Forums. Removed in 10.00.00. Use DotNetNuke.Modules.ActiveForums.Controllers.SubscriptionController().Subscribed(PortalId, ModuleId, UserId, ForumId, TopicId).")] public static bool IsSubscribed(int PortalId, int ModuleId, int ForumId, int TopicId, SubscriptionTypes SubscriptionType, int UserId) { return new DotNetNuke.Modules.ActiveForums.Controllers.SubscriptionController().Subscribed(PortalId, ModuleId, UserId, ForumId, TopicId); } - [Obsolete("Deprecated in Community Forums. Removed in 10.00.00. Use DotNetNuke.Modules.ActiveForums.Controllers.SubscriptionController.")] + [Obsolete("Deprecated in Community Forums. Removed in 10.00.00. Use DotNetNuke.Modules.ActiveForums.Controllers.SubscriptionController().Subscribed(PortalId, ModuleId, UserId, ForumId).")] public static bool IsSubscribed(int PortalId, int ModuleId, int ForumId, SubscriptionTypes SubscriptionType, int UserId) { return new DotNetNuke.Modules.ActiveForums.Controllers.SubscriptionController().Subscribed(PortalId, ModuleId, UserId, ForumId); } + //TODO: move to new DAL2 subscription controller public static void SendSubscriptions(int PortalId, int ModuleId, int TabId, int ForumId, int TopicId, int ReplyId, int AuthorId) { DotNetNuke.Modules.ActiveForums.Entities.ForumInfo fi = new DotNetNuke.Modules.ActiveForums.Controllers.ForumController().GetById(forumId: ForumId, moduleId: ModuleId); SendSubscriptions(PortalId, ModuleId, TabId, fi, TopicId, ReplyId, AuthorId); } + //TODO: move to new DAL2 subscription controller public static void SendSubscriptions(int PortalId, int ModuleId, int TabId, DotNetNuke.Modules.ActiveForums.Entities.ForumInfo fi, int TopicId, int ReplyId, int AuthorId) { SendSubscriptions(-1, PortalId, ModuleId, TabId, fi, TopicId, ReplyId, AuthorId, null); } + //TODO: move to new DAL2 subscription controller public static void SendSubscriptions(int TemplateId, int PortalId, int ModuleId, int TabId, DotNetNuke.Modules.ActiveForums.Entities.ForumInfo fi, int TopicId, int ReplyId, int AuthorId, Uri requestUrl) { var sc = new SubscriptionController(); @@ -130,6 +135,7 @@ public static void SendSubscriptions(int TemplateId, int PortalId, int ModuleId, } } + //TODO: move to new DAL2 subscription controller public static void SendSubscriptions(SubscriptionTypes SubscriptionType, DateTime StartDate) { string sysTemplateName = "DailyDigest"; diff --git a/Dnn.CommunityForums/class/UserProfiles.cs b/Dnn.CommunityForums/class/UserProfiles.cs index f6606403..25228833 100644 --- a/Dnn.CommunityForums/class/UserProfiles.cs +++ b/Dnn.CommunityForums/class/UserProfiles.cs @@ -193,7 +193,6 @@ public static string GetUserRank(int portalId, int moduleID, int userID, int pos { var strHost = Common.Globals.AddHTTP(Common.Globals.GetDomainName(HttpContext.Current.Request)) + "/"; var rc = new RewardController(); - var i = 0; var sRank = string.Empty; foreach (var ri in rc.Reward_List(portalId, moduleID, true).Where(ri => ri.MinPosts <= posts && ri.MaxPosts > posts)) { diff --git a/Dnn.CommunityForums/class/Utilities.cs b/Dnn.CommunityForums/class/Utilities.cs index 5bb8124c..8423b390 100644 --- a/Dnn.CommunityForums/class/Utilities.cs +++ b/Dnn.CommunityForums/class/Utilities.cs @@ -1126,9 +1126,6 @@ private static string LocalizeControl(string controlText, string resourceFile, b { controlText = controlText.Replace(" class=afquote", " class=\"afquote\""); - var i = 0; - var intStart = 0; - var intEnd = 0; const string pattern = @"(\[RESX:.+?\])"; var regExp = new Regex(pattern); var matches = regExp.Matches(controlText); diff --git a/Dnn.CommunityForums/controls/admin_home.ascx.cs b/Dnn.CommunityForums/controls/admin_home.ascx.cs index 610a59c1..40203937 100644 --- a/Dnn.CommunityForums/controls/admin_home.ascx.cs +++ b/Dnn.CommunityForums/controls/admin_home.ascx.cs @@ -66,7 +66,6 @@ private void LoadQuickLinks() private void BindRecentTopics(DataTable dt) { StringBuilder sb = new StringBuilder(1024); - int rows = 0; sb.Append(""); sb.Append(""); if (dt.Rows.Count > 0) @@ -89,7 +88,6 @@ private void BindRecentTopics(DataTable dt) private void BindRecentMembers(DataTable dt) { StringBuilder sb = new StringBuilder(1024); - int rows = 0; sb.Append("
[RESX:Topic][RESX:Author]
"); sb.Append(""); if (dt.Rows.Count > 0) @@ -114,7 +112,6 @@ private void BindRecentMembers(DataTable dt) private void BindTopForums(DataTable dt) { StringBuilder sb = new StringBuilder(1024); - int rows = 0; sb.Append("
[RESX:Date][RESX:Name][RESX:UserName]
"); sb.Append(""); if (dt.Rows.Count > 0) @@ -138,7 +135,6 @@ private void BindTopForums(DataTable dt) private void BindTopMembers(DataTable dt) { StringBuilder sb = new StringBuilder(1024); - int rows = 0; sb.Append("
[RESX:ForumName][RESX:Topics][RESX:Replies]
"); if (dt.Rows.Count > 0) { @@ -160,7 +156,6 @@ private void BindTopMembers(DataTable dt) private void BindQuickStats(DataTable dt) { StringBuilder sb = new StringBuilder(1024); - int rows = 0; sb.Append("
"); if (dt.Rows.Count > 0) { diff --git a/Dnn.CommunityForums/controls/admin_securitygrid.ascx.cs b/Dnn.CommunityForums/controls/admin_securitygrid.ascx.cs index 1ecc333c..9f54a1e0 100644 --- a/Dnn.CommunityForums/controls/admin_securitygrid.ascx.cs +++ b/Dnn.CommunityForums/controls/admin_securitygrid.ascx.cs @@ -208,7 +208,6 @@ private void BuildNewGrid(DotNetNuke.Modules.ActiveForums.Entities.PermissionInf sb.Append("
"); sb.Append(""); string tmpObjectName = string.Empty; - int secRows = 0; for (int x = 0; x < pl.Count; x++) { sb.Append("
" + Utilities.GetSharedResource("[RESX:SecureObjects]", true) + "
"); diff --git a/Dnn.CommunityForums/controls/af_members.ascx.cs b/Dnn.CommunityForums/controls/af_members.ascx.cs index e6ae1650..cb054919 100644 --- a/Dnn.CommunityForums/controls/af_members.ascx.cs +++ b/Dnn.CommunityForums/controls/af_members.ascx.cs @@ -34,7 +34,6 @@ protected override void OnLoad(EventArgs e) base.OnLoad(e); lblHeader.Text = Utilities.GetSharedResource("[RESX:MemberDirectory]"); - bool bCanLoad = false; string sMode = MainSettings.MemberListMode; if (!UserInfo.IsSuperUser) { diff --git a/Dnn.CommunityForums/controls/af_modtopics.ascx.cs b/Dnn.CommunityForums/controls/af_modtopics.ascx.cs index 4344041e..b739c21b 100644 --- a/Dnn.CommunityForums/controls/af_modtopics.ascx.cs +++ b/Dnn.CommunityForums/controls/af_modtopics.ascx.cs @@ -344,7 +344,6 @@ private string GetAttachments(int ContentId, int PortalID, int ModuleID, DataTab foreach (DataRow dr in dtAttach.DefaultView.ToTable().Rows) { sb.Append("
"); - string tmpPath = null; int attachId = Convert.ToInt32(dr["AttachId"]); string Filename = dr["Filename"].ToString(); string contentType = dr["ContentType"].ToString(); diff --git a/Dnn.CommunityForums/controls/af_post.ascx.cs b/Dnn.CommunityForums/controls/af_post.ascx.cs index a687afb0..b81b3e29 100644 --- a/Dnn.CommunityForums/controls/af_post.ascx.cs +++ b/Dnn.CommunityForums/controls/af_post.ascx.cs @@ -342,7 +342,6 @@ private void cbPreview_Callback(object sender, CallBackEventArgs e) private void LoadTopic() { ctlForm.EditorMode = Modules.ActiveForums.Controls.SubmitForm.EditorModes.EditTopic; - var tc = new TopicsController(); var ti = new DotNetNuke.Modules.ActiveForums.Controllers.TopicController().GetById(TopicId); if (ti == null) { @@ -518,8 +517,6 @@ private void PrepareReply() } else { - //TODO: Find out why Topic Get is called twice in this method - var tc = new TopicsController(); var ti = new DotNetNuke.Modules.ActiveForums.Controllers.TopicController().GetById(TopicId); if (ti == null) @@ -565,7 +562,6 @@ private void PrepareReply() DotNetNuke.Modules.ActiveForums.Entities.ContentInfo ci; if (postId == TopicId) { - ti = new DotNetNuke.Modules.ActiveForums.Controllers.TopicController().GetById(TopicId); ci = ti.Content; sPostedBy = string.Format(sPostedBy, UserProfiles.GetDisplayName(ForumModuleId, true, false, false, ti.Content.AuthorId, ti.Author.Username, ti.Author.FirstName, ti.Author.LastName, ti.Author.DisplayName), Utilities.GetSharedResource("On.Text"), Utilities.GetUserFormattedDateTime(ti.Content.DateCreated, PortalId, UserId)); } @@ -664,7 +660,6 @@ private void SaveTopic() return; } - var tc = new TopicsController(); DotNetNuke.Modules.ActiveForums.Entities.TopicInfo ti; if (TopicId > 0) @@ -916,9 +911,12 @@ private void SaveReply() DotNetNuke.Modules.ActiveForums.Entities.ReplyInfo ri; + var sc = new DotNetNuke.Modules.ActiveForums.Controllers.SubscriptionController(); + var rc = new DotNetNuke.Modules.ActiveForums.Controllers.ReplyController(); + if (PostId > 0) { - ri = new DotNetNuke.Modules.ActiveForums.Controllers.ReplyController().GetById(PostId); + ri = rc.GetById(PostId); ri.Content.DateCreated = DateTime.UtcNow; ri.Content.DateUpdated = DateTime.UtcNow; } @@ -956,28 +954,28 @@ private void SaveReply() ri.TopicId = TopicId; if (UserPrefTopicSubscribe) { - new DotNetNuke.Modules.ActiveForums.Controllers.SubscriptionController().Subscribe(PortalId, ForumModuleId, UserId, ForumId, ri.TopicId); + sc.Subscribe(PortalId, ForumModuleId, UserId, ForumId, ri.TopicId); } - var tmpReplyId = new DotNetNuke.Modules.ActiveForums.Controllers.ReplyController().Reply_Save(PortalId, ForumModuleId, ri); - ri = new DotNetNuke.Modules.ActiveForums.Controllers.ReplyController().Reply_Get(PortalId, ForumModuleId, TopicId, tmpReplyId); + var tmpReplyId = rc.Reply_Save(PortalId, ForumModuleId, ri); + ri = rc.Reply_Get(PortalId, ForumModuleId, TopicId, tmpReplyId); SaveAttachments(ri.ContentId); try { if (ctlForm.Subscribe && authorId == UserId) { - if (!(Subscriptions.IsSubscribed(PortalId, ForumModuleId, ForumId, TopicId, SubscriptionTypes.Instant, authorId))) + if (!(sc.Subscribed(PortalId, ForumModuleId, authorId, ForumId, TopicId))) { - var sc = new SubscriptionController(); - sc.Subscription_Update(PortalId, ForumModuleId, ForumId, TopicId, 1, authorId, ForumUser.UserRoles); + //TODO: move to new DAL2 subscription controller + new SubscriptionController().Subscription_Update(PortalId, ForumModuleId, ForumId, TopicId, 1, authorId, ForumUser.UserRoles); } } else if (_isEdit) { - var isSub = Subscriptions.IsSubscribed(PortalId, ForumModuleId, ForumId, TopicId, SubscriptionTypes.Instant, authorId); + var isSub = new DotNetNuke.Modules.ActiveForums.Controllers.SubscriptionController().Subscribed(PortalId, ForumModuleId, authorId, ForumId, TopicId); if (isSub && !ctlForm.Subscribe) { - var sc = new SubscriptionController(); - sc.Subscription_Update(PortalId, ForumModuleId, ForumId, TopicId, 1, authorId, ForumUser.UserRoles); + //TODO: move to new DAL2 subscription controller + new SubscriptionController().Subscription_Update(PortalId, ForumModuleId, ForumId, TopicId, 1, authorId, ForumUser.UserRoles); } } if (ri.IsApproved == false) diff --git a/Dnn.CommunityForums/controls/af_posticonlist.ascx.cs b/Dnn.CommunityForums/controls/af_posticonlist.ascx.cs index f4fdf98d..5735027c 100644 --- a/Dnn.CommunityForums/controls/af_posticonlist.ascx.cs +++ b/Dnn.CommunityForums/controls/af_posticonlist.ascx.cs @@ -28,31 +28,8 @@ namespace DotNetNuke.Modules.ActiveForums { public partial class af_posticonlist : System.Web.UI.UserControl { - private string _Theme; - private string _PostIcon; - public string Theme - { - get - { - return _Theme; - } - set - { - _Theme = value; - } - } - public string PostIcon - { - get - { - string tempPostIcon = null; - return _PostIcon; //PostIcon = rblMessageIcons1.SelectedItem.Value - } - set - { - _PostIcon = value; - } - } + public string Theme { get; set; } + public string PostIcon { get; set; } protected override void OnLoad(EventArgs e) { base.OnLoad(e); @@ -71,7 +48,7 @@ protected override void OnLoad(EventArgs e) } catch (Exception ex) { - + DotNetNuke.Services.Exceptions.Exceptions.LogException(ex); } } private void LoadPostIcons() diff --git a/Dnn.CommunityForumsTests/Controllers/TopicPropertyControllerTests.cs b/Dnn.CommunityForumsTests/Controllers/TopicPropertyControllerTests.cs index 52517614..2782f857 100644 --- a/Dnn.CommunityForumsTests/Controllers/TopicPropertyControllerTests.cs +++ b/Dnn.CommunityForumsTests/Controllers/TopicPropertyControllerTests.cs @@ -62,7 +62,7 @@ public void DeserializeTest() //Assert - Assert.That(actualResult.Count, Is.EqualTo((mockPropertyList.Object).Count)); + Assert.That(actualResult, Has.Count.EqualTo((mockPropertyList.Object).Count)); Assert.That(actualResult.First().PropertyId, Is.EqualTo((mockPropertyList.Object)[0].PropertyId)); Assert.That(actualResult.First().Name, Is.EqualTo((mockPropertyList.Object)[0].Name)); Assert.That(actualResult.First().Value, Is.EqualTo((mockPropertyList.Object)[0].Value));