Skip to content

Commit e773f92

Browse files
authored
Merge pull request #1509 from DNNCommunity/dev
TASK: Merge dev to master
2 parents abaef05 + c46b327 commit e773f92

File tree

10 files changed

+452
-63
lines changed

10 files changed

+452
-63
lines changed

Dnn.CommunityForums/CustomControls/UserControls/TopicView.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ private void LoadData(int pageId)
214214
}
215215

216216
// Test for a proper dataset
217-
if (ds.Tables.Count < 4 || ds.Tables[0].Rows.Count == 0 || ds.Tables[1].Rows.Count == 0)
217+
if (ds.Tables?.Count < 4 || ds.Tables[0]?.Rows?.Count == 0 || ds.Tables[1]?.Rows?.Count == 0)
218218
{
219219
this.Response.Redirect(Utilities.NavigateURL(this.TabId), false);
220220
this.Context.ApplicationInstance.CompleteRequest();

Dnn.CommunityForums/DnnCommunityForums.dnn

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<dotnetnuke type="Package" version="5.0">
22
<packages>
3-
<package name="Active Forums" type="Module" version="09.00.00">
3+
<package name="Active Forums" type="Module" version="09.00.01">
44
<friendlyName>DNN Community Forums</friendlyName>
55
<description>DNN Community Forums: The official online forums module for the DNN Community.</description>
66
<iconFile>DesktopModules/ActiveForums/images/branding/logo/DNN-Community-Forums-Icon-64px.png</iconFile>
@@ -86,7 +86,7 @@
8686
<assembly>
8787
<name>DotNetNuke.Modules.ActiveForums.dll</name>
8888
<sourceFileName>bin\DotNetNuke.Modules.ActiveForums.dll</sourceFileName>
89-
<version>09.00.00</version>
89+
<version>09.00.01</version>
9090
</assembly>
9191
</assemblies>
9292
</component>
@@ -424,10 +424,15 @@
424424
<name>09.00.00.SqlDataProvider</name>
425425
<version>09.00.00</version>
426426
</script>
427+
<script type="Install">
428+
<path>sql</path>
429+
<name>09.00.01.SqlDataProvider</name>
430+
<version>09.00.01</version>
431+
</script>
427432
<script type="UnInstall">
428433
<path>sql</path>
429434
<name>Uninstall.SqlDataProvider</name>
430-
<version>09.00.00</version>
435+
<version>09.00.01</version>
431436
</script>
432437
</scripts>
433438
</component>
@@ -471,7 +476,7 @@
471476
</components>
472477
</package>
473478

474-
<package name="Active Forums What's New" type="Module" version="09.00.00">
479+
<package name="Active Forums What's New" type="Module" version="09.00.01">
475480

476481
<friendlyName>DNN Community Forums What's New</friendlyName>
477482
<foldername>ActiveForumsWhatsNew</foldername>
@@ -541,7 +546,7 @@
541546
</components>
542547
</package>
543548

544-
<package name="Active Forums Viewer" type="Module" version="09.00.00">
549+
<package name="Active Forums Viewer" type="Module" version="09.00.01">
545550
<friendlyName>DNN Community Forums Forums Viewer</friendlyName>
546551
<foldername>ActiveForumsViewer</foldername>
547552
<description>DNN Community Forums: Display any forum topic view on any page within your site.</description>

Dnn.CommunityForums/DnnCommunityForums_Symbols.dnn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<dotnetnuke type="Package" version="5.0">
22
<packages>
3-
<package name="Active Forums_Symbols" type="Library" version="09.00.00">
3+
<package name="Active Forums_Symbols" type="Library" version="09.00.01">
44

55
<friendlyName>DNN Community Forums Symbols</friendlyName>
66
<description>DNN Community Forums: The official online forums module for the DNN Community.</description>
@@ -15,7 +15,7 @@
1515
<releaseNotes src="ReleaseNotes.txt" />
1616
<azureCompatible>True</azureCompatible>
1717
<dependencies>
18-
<dependency type="managedPackage" version="9.0.0">Active Forums</dependency>
18+
<dependency type="managedPackage" version="9.0.1">Active Forums</dependency>
1919
</dependencies>
2020
<components>
2121
<component type="ResourceFile">

Dnn.CommunityForums/Entities/ForumGroupInfo.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,11 @@ public DotNetNuke.Services.Tokens.CacheLevel Cacheability
233233
/// <inheritdoc/>
234234
public string GetProperty(string propertyName, string format, System.Globalization.CultureInfo formatProvider, DotNetNuke.Entities.Users.UserInfo accessingUser, Scope accessLevel, ref bool propertyNotFound)
235235
{
236+
if (!DotNetNuke.Modules.ActiveForums.Controllers.PermissionController.HasRequiredPerm(this.Security.ViewRoleIds, DotNetNuke.Modules.ActiveForums.Controllers.PermissionController.GetUsersRoleIds(this.PortalSettings, accessingUser)))
237+
{
238+
return string.Empty;
239+
}
240+
236241
// replace any embedded tokens in format string
237242
if (format.Contains("["))
238243
{

Dnn.CommunityForums/Entities/ForumInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ internal string GetForumFolderIconCss(DotNetNuke.Modules.ActiveForums.Entities.F
792792
/// <inheritdoc/>
793793
public string GetProperty(string propertyName, string format, System.Globalization.CultureInfo formatProvider, DotNetNuke.Entities.Users.UserInfo accessingUser, Scope accessLevel, ref bool propertyNotFound)
794794
{
795-
if (!DotNetNuke.Modules.ActiveForums.Controllers.PermissionController.HasRequiredPerm(this.Security.ViewRoleIds, DotNetNuke.Modules.ActiveForums.Controllers.PermissionController.GetRoleIdsFromRoleNameArray(this.PortalId, accessingUser.Roles)))
795+
if (!DotNetNuke.Modules.ActiveForums.Controllers.PermissionController.HasRequiredPerm(this.Security.ViewRoleIds, DotNetNuke.Modules.ActiveForums.Controllers.PermissionController.GetUsersRoleIds(this.PortalSettings, accessingUser)))
796796
{
797797
return string.Empty;
798798
}
@@ -885,10 +885,10 @@ public string GetProperty(string propertyName, string format, System.Globalizati
885885
case "forumiconcss":
886886
return PropertyAccess.FormatString(this.GetForumFolderIconCss(new Controllers.ForumUserController(this.ModuleId).GetByUserId(accessingUser.PortalID, accessingUser.UserID)), format);
887887
case "rsslink":
888-
return this.FeatureSettings.AllowRSS && Controllers.PermissionController.HasRequiredPerm(this.Security.ReadRoleIds, DotNetNuke.Modules.ActiveForums.Controllers.PermissionController.GetRoleIdsFromRoleNameArray(this.PortalId, accessingUser.Roles)) ? PropertyAccess.FormatString(this.RssLink, format) : string.Empty;
888+
return this.FeatureSettings.AllowRSS && Controllers.PermissionController.HasRequiredPerm(this.Security.ReadRoleIds, DotNetNuke.Modules.ActiveForums.Controllers.PermissionController.GetUsersRoleIds(this.PortalSettings, accessingUser)) ? PropertyAccess.FormatString(this.RssLink, format) : string.Empty;
889889
case "modlink":
890890
var modLink = Utilities.NavigateURL(this.GetTabId(), this.portalSettings, string.Empty, new[] { $"{ParamKeys.ViewType}={Views.ModerateTopics}", $"{ParamKeys.ForumId}={this.ForumID}" });
891-
return Controllers.PermissionController.HasRequiredPerm(this.Security.ModerateRoleIds, DotNetNuke.Modules.ActiveForums.Controllers.PermissionController.GetRoleIdsFromRoleNameArray(this.PortalId, accessingUser.Roles)) ? PropertyAccess.FormatString(modLink, format) : string.Empty;
891+
return PropertyAccess.FormatString(modLink, format);
892892
}
893893
}
894894
catch (Exception ex)

Dnn.CommunityForums/ReleaseNotes.txt

Lines changed: 15 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<blockquote class="dcf-oldnews">
2727

2828
<h2 class="muy-importante">
29-
Upgrading to 9.0 if you have customized templates (must read)
29+
Upgrading to 9.0.x if you have customized templates (must read)
3030
</h2>
3131
<p>
3232
First, if you're upgrading to version 9.0 AND you have customized templates, you NEED to view the important release note FYI wiki article below.
@@ -47,15 +47,16 @@
4747
<hr />
4848

4949
<h3>
50-
09.00.00
50+
09.00.01
5151
</h3>
5252
<p>
5353
<b>THANK YOU</b> for all of the valuable contributions by
54-
<a href="https://github.com/johnhenley" target="_blank">@johnhenley</a>,
54+
<a href="https://github.com/johnhenley" target="_blank">@johnhenley</a>
55+
<!--,,
5556
<a href="https://github.com/nvsai" target="_blank">@nvsai</a>,
5657
<a href="https://github.com/ernieblues" target="_blank">@nvsai</a>, and
5758
<a href="https://github.com/Timo-Breumelhof" target="_blank">@Timo-Breumelhof</a>
58-
59+
-->.
5960
<!--,
6061
, and
6162
<a href="https://github.com/WillStrohl" target="_blank">@WillStrohl</a>
@@ -67,6 +68,7 @@
6768

6869
<h4>New Features &amp; Enhancements</h4>
6970
<ul>
71+
<!--
7072
<li>NEW: Convention-based template names (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/477">Issue 477</a>)</li>
7173
<li>NEW: Moderators can now see attachments on unapproved topics (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1386">Issue 1386</a>)</li>
7274
<li>NEW: Avatar token can contain size, e.g., [FORUMAUTHOR:AVATAR:50] (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/421">Issue 421</a>)</li>
@@ -75,9 +77,9 @@
7577
<li>NEW: More modern email notification template and UTF8 encoding (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1457">Issue 1457</a>)</li>
7678
<li>NEW: Wider quick reply subject text box (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1470">Issue 1470</a>)</li>
7779

78-
<!--
80+
-->
7981
<li>None at this time.</li>
80-
-->
82+
8183
<!--
8284
<li>UPDATE: (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/">Issue </a>)</li>
8385
<li>None at this time.</li>
@@ -86,20 +88,11 @@
8688

8789
<h4>Bug Fixes</h4>
8890
<ul>
89-
<li>FIXED: Unauthenticated users should not see direct-messaging icon (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1403">Issue 1403</a>)</li>
90-
<li>FIXED: Brackets in content interfering with token replacement (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1384">Issue 1384</a>)</li>
91-
<li>FIXED: 'Edit' link in topics view loading latest reply rather than the originating topic (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1396">Issue 1396</a>)</li>
92-
<li>FIXED: Scheduler item not correctly removed in 8.1 (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1397">Issue 1397</a>)</li>
93-
<li>FIXED: Submit button disabled after click to prevent duplicated posts (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1031">Issue 1031</a>)</li>
94-
<li>FIXED: Token replacement causing page to not load if topic contains curly braces (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1435">Issue 1435</a>)</li>
95-
<li>FIXED: Forum Groups not inheriting from default settings are losing their sort order (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1433">Issue 1433</a>)</li>
96-
<li>FIXED: Keep Unicode quotes and accents out of friendly URLs (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1456">Issue 1456</a>)</li>
97-
<li>FIXED: Incorrect image paths for spacers in control panel (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1467">Issue 1467</a>)</li>
98-
<li>FIXED: Collapsible sections not opening on first click (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1462">Issue 1462</a>)</li>
99-
<li>FIXED: Broken link in moderation notification emails (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1468">Issue 1468</a>)</li>
100-
<li>FIXED: During 09.00.00 upgrade, fix any permissions (role Id's) separated by colon rather than semi-colon (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1443">Issue 1443</a>)</li>
101-
<li>FIXED: After upgrade to 09.00.00, email notifications are missing the email body (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1452">Issue 1452</a>)</li>
102-
<li>FIXED: After upgrade to 09.00.00, exception when retrieving notification subscriptions (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1463">Issue 1463</a>)</li>
91+
<li>FIXED: "Error: DNN Community Forums is currently unavailable." when viewing likes (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1496">Issue 1496</a>)</li>
92+
<li>FIXED: Privileged content not showing just after logging in (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1501">Issue 1501</a>)</li>
93+
<li>FIXED: Forums containing "announcement" topics are not displaying correctly (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1494">Issue 1494</a>)</li>
94+
<li>FIXED: Moderated post approval not refreshing page when one item on page (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1500">Issue 1500</a>)</li>
95+
<li>FIXED: Misplaced {objectQualifer} token in SQL script (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1498">Issue 1498</a>)</li>
10396
<!--
10497
<li>FIXED: (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/">Issue </a>!)</li>
10598
<li>None at this time.</li>
@@ -108,23 +101,8 @@
108101

109102
<h4>Tasks / Development Updates (and Technical Debt)</h4>
110103
<ul>
111-
<li>Remove template editor from control panel (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1354">Issue 1354</a>)</li>
112-
<li>Refactor/modernize template caching and controller methods (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/465">Issue 465</a>)</li>
113-
<li>Refactor/modernize permissions checking (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/950">Issue 950</a>)</li>
114-
<li>Convert NTEXT database columns to NVARCHAR(MAX) (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1184">Issue 1184</a>)</li>
115-
<li>Update minimum DNN Platform dependency to 9.11 (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1224">Issue 1224</a>)</li>
116-
<li>Migrate csproj to SDK format (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1274">Issue 1274</a>)</li>
117-
<li>Update third-party dependencies (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1307">Issue 1307</a>)</li>
118-
<li>Update code files to use explicit <emphasis>using</emphasis> statements (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1350">Issue 1350</a>)</li>
119-
<li>Duplicated tags in csproj file (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1421">Issue 1421</a>)</li>
120-
<li>Remove unused images (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1310">Issue 1310</a>)</li>
121-
<li>Remove deprecated methods (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/377">Issue 377</a>)</li>
122-
<li>Update MSBuild.Community.Tasks to 1.5.0.235 (no longer require .NET Framework 3.5/2.0 for build) (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1418">Issue 1418</a>)</li>
123-
<li>Remove legacy Analyzer tags from project file (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1425">Issue 1425</a>)</li>
124-
<li>Update wiki documentation for v8-v9 upgrade path for anyone using customized templates (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1352">Issue 1352</a>)</li>
125-
<li>09.00.00 RC1 Release Prep (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1423">Issue 1423</a>)</li>
126-
<li>09.00.00 RC2 Release Prep (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1436">Issue 1436</a>)</li>
127-
<li>09.00.00 Release Prep (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1460">Issue 1460</a>)</li>
104+
105+
<li>09.00.01 Release Prep (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1505">Issue 1505</a>)</li>
128106
<!--
129107
<li>TASK: (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/">Issue </a>)</li>
130108
<li>None at this time.</li>

Dnn.CommunityForums/controls/af_likes.ascx.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ private List<string> Parameters
8282
protected override void OnInit(EventArgs e)
8383
{
8484
base.OnInit(e);
85-
string template = DotNetNuke.Modules.ActiveForums.Controllers.TemplateController.Template_Get(this.ForumModuleId, Enums.TemplateType.Likes, this.ForumInfo.FeatureSettings.TemplateFileNameSuffix);
85+
86+
this.post = new DotNetNuke.Modules.ActiveForums.Controllers.ContentController().GetById(this.ContentId, this.ForumModuleId).Post;
87+
string template = DotNetNuke.Modules.ActiveForums.Controllers.TemplateController.Template_Get(this.ForumModuleId, Enums.TemplateType.Likes, this.post.Forum.FeatureSettings.TemplateFileNameSuffix ?? SettingsBase.GetModuleSettings(this.ForumModuleId).ForumFeatureSettings.TemplateFileNameSuffix);
8688

8789
try
8890
{
@@ -111,8 +113,6 @@ protected override void OnLoad(EventArgs e)
111113
}
112114

113115
this.BindLikes();
114-
115-
var post = new DotNetNuke.Modules.ActiveForums.Controllers.ContentController().GetById(this.ContentId, this.ForumModuleId).Post;
116116
foreach (Control control in this.ctl.Controls)
117117
{
118118
string template = string.Empty;
@@ -134,9 +134,9 @@ protected override void OnLoad(EventArgs e)
134134

135135
if (!string.IsNullOrEmpty(template) && template.Contains("["))
136136
{
137-
if (post != null)
137+
if (this.post != null)
138138
{
139-
template = DotNetNuke.Modules.ActiveForums.Services.Tokens.TokenReplacer.ReplacePostTokens(new StringBuilder(template), post, this.PortalSettings, this.MainSettings, new Services.URLNavigator().NavigationManager(), this.ForumUser, this.Request.Url, this.Request.RawUrl).ToString();
139+
template = DotNetNuke.Modules.ActiveForums.Services.Tokens.TokenReplacer.ReplacePostTokens(new StringBuilder(template), this.post, this.PortalSettings, this.MainSettings, new Services.URLNavigator().NavigationManager(), this.ForumUser, this.Request.Url, this.Request.RawUrl).ToString();
140140
if (control.GetType().FullName == "System.Web.UI.LiteralControl")
141141
{
142142
((System.Web.UI.LiteralControl)control).Text = template;

Dnn.CommunityForums/controls/af_modtopics.ascx.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ private void cbMod_Callback(object sender, Modules.ActiveForums.Controls.CallBac
231231
}
232232

233233
this.BuildModList();
234+
this.lblHeader.RenderControl(e.Output);
234235
this.litTopics.RenderControl(e.Output);
235236
}
236237

@@ -244,13 +245,13 @@ private void BuildModList()
244245
DataTable dtContent = ds.Tables[0];
245246
DataTable dtAttach = ds.Tables[1];
246247
string tmpForum = string.Empty;
248+
sb.Append("<div id=\"afgrid\" style=\"position:relative;\"><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">");
247249
if (dtContent.Rows.Count < 1)
248250
{
249251
this.lblHeader.Text = Utilities.GetSharedResource("[RESX:NoPendingPosts]");
250252
}
251253
else
252254
{
253-
sb.Append("<div id=\"afgrid\" style=\"position:relative;\"><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">");
254255
foreach (DataRow dr in dtContent.Rows)
255256
{
256257
string forumKey = dr["ForumId"].ToString() + dr["ForumName"].ToString();
@@ -328,10 +329,9 @@ private void BuildModList()
328329
sb.Append("</table></div>");
329330
}
330331
}
331-
332-
sb.Append("</table></div>");
333332
}
334333

334+
sb.Append("</table></div>");
335335
this.litTopics.Text = Utilities.LocalizeControl(sb.ToString());
336336
}
337337

0 commit comments

Comments
 (0)