Skip to content

Commit 13aebf9

Browse files
authored
Merge pull request #1830 from DNNCommunity/dev
TASK: Merge dev to master
2 parents 0c835ba + 14598a2 commit 13aebf9

10 files changed

Lines changed: 85 additions & 38 deletions

Dnn.CommunityForums/Controllers/TagController.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ internal static void UpdateTopicTags(DotNetNuke.Modules.ActiveForums.Entities.IP
114114
{
115115
var topicTagController = new DotNetNuke.Modules.ActiveForums.Controllers.TopicTagController();
116116
var existingTags = topicTagController.GetForTopic(post.TopicId);
117-
tags.Distinct().ToList().ForEach(t =>
117+
tags.Distinct().ToList().Where(t => !string.IsNullOrEmpty(t)).ForEach(t =>
118118
{
119119
var tag = tagController.Find("WHERE TagName = @0", t).FirstOrDefault();
120120
if (tag == null)
@@ -127,7 +127,6 @@ internal static void UpdateTopicTags(DotNetNuke.Modules.ActiveForums.Entities.IP
127127
};
128128
tagController.Insert(tag);
129129
}
130-
;
131130

132131
// if the tag is not already associated with the topic, add it
133132
if (!existingTags.Any(et => et.TagId == tag.TagId))
@@ -167,6 +166,6 @@ internal void Delete(DotNetNuke.Modules.ActiveForums.Entities.TagInfo item)
167166
{
168167
new DotNetNuke.Modules.ActiveForums.Controllers.TopicTagController().DeleteForTag(item.TagId);
169168
base.Delete(item);
170-
}
169+
}
171170
}
172171
}

Dnn.CommunityForums/DnnCommunityForums.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
<Description>Discussion Forum Module for DNN</Description>
1313
<Company>dnncommunity.org</Company>
1414
<Authors>dnncommunity.org</Authors>
15-
<FileVersion>09.06.05.00</FileVersion>
16-
<AssemblyVersion>09.06.05.00</AssemblyVersion>
15+
<FileVersion>09.06.06.00</FileVersion>
16+
<AssemblyVersion>09.06.06.00</AssemblyVersion>
1717
<IncludeSymbols>False</IncludeSymbols>
1818
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
1919
<AnalysisLevel>latest</AnalysisLevel>

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.06.05">
3+
<package name="Active Forums" type="Module" version="09.06.06">
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.06.05</version>
89+
<version>09.06.06</version>
9090
</assembly>
9191
</assemblies>
9292
</component>
@@ -474,10 +474,15 @@
474474
<name>09.06.01.SqlDataProvider</name>
475475
<version>09.06.01</version>
476476
</script>
477+
<script type="Install">
478+
<path>sql</path>
479+
<name>09.06.06.SqlDataProvider</name>
480+
<version>09.06.06</version>
481+
</script>
477482
<script type="UnInstall">
478483
<path>sql</path>
479484
<name>Uninstall.SqlDataProvider</name>
480-
<version>09.06.01</version>
485+
<version>09.06.06</version>
481486
</script>
482487
</scripts>
483488
</component>
@@ -521,7 +526,7 @@
521526
<component type="Cleanup" version="09.06.00" fileName="09.06.00.txt" />
522527
</components>
523528
</package>
524-
<package name="Active Forums What's New" type="Module" version="09.06.05">
529+
<package name="Active Forums What's New" type="Module" version="09.06.06">
525530

526531
<friendlyName>DNN Community Forums What's New</friendlyName>
527532
<foldername>ActiveForumsWhatsNew</foldername>
@@ -591,7 +596,7 @@
591596
</components>
592597
</package>
593598

594-
<package name="Active Forums Viewer" type="Module" version="09.06.05">
599+
<package name="Active Forums Viewer" type="Module" version="09.06.06">
595600
<friendlyName>DNN Community Forums Forums Viewer</friendlyName>
596601
<foldername>ActiveForumsViewer</foldername>
597602
<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.06.05">
3+
<package name="Active Forums_Symbols" type="Library" version="09.06.06">
44
<friendlyName>DNN Community Forums Symbols</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>
@@ -14,7 +14,7 @@
1414
<releaseNotes src="ReleaseNotes.txt" />
1515
<azureCompatible>True</azureCompatible>
1616
<dependencies>
17-
<dependency type="managedPackage" version="9.6.5">Active Forums</dependency>
17+
<dependency type="managedPackage" version="9.6.6">Active Forums</dependency>
1818
</dependencies>
1919
<components>
2020
<component type="ResourceFile">

Dnn.CommunityForums/ReleaseNotes.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
DNN Community Forums Release Notes
4747
</h2>
4848
<h3>
49-
09.06.05
49+
09.06.06
5050
</h3>
5151
<!--
5252
<p>
@@ -74,7 +74,8 @@
7474
-->
7575
<h4>New Features &amp; Enhancements</h4>
7676
<ul>
77-
<li>UPDATE: Tweaks to topics view: show status text not status ID, reply count should show if not logged in, show last post author/date from topic if no replies, new token [FORUMTOPIC:LASTPOSTURL] (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/pull/1811">PR 1811</a>)</li>
77+
78+
<li>UPDATE: When selecting users for mentions and visibility is "Registered Users", admins can also select other admins, and superusers can select anyone (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1819">Issue 1819</a>)</li>
7879
<!--
7980
<li>None at this time.</li>
8081
<li>NEW: Web API endpoints for forums search functionality (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/pull/1758">PR 1758</a>)</li>
@@ -97,8 +98,8 @@
9798
<h4>Bug Fixes</h4>
9899

99100
<ul>
100-
<li>FIX: Friendly URL for forum group only not showing forums (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1807">Issue 1807</a>)</li>
101-
<li>FIX: Hashtag character # inadvertently removed if tagging is disabled by security (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1812">Issue 1812</a>)</li>
101+
<li>FIX: Prevent blank tags from being created (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1825">Issue 1825</a>)</li>
102+
<li>FIX: Correct location of Control Panel forums feature popup (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1820">Issue 1820</a>)</li>
102103
<!--
103104
<li>None at this time.</li>
104105

@@ -110,7 +111,8 @@
110111

111112
<h4>Tasks / Development Updates (and Technical Debt Reduction)</h4>
112113
<ul>
113-
<li>Update build dependencies (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1814">Issue 1814</a>)</li>
114+
<li>09.06.06 Release Prep (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1828">Issue 1828</a>)</li>
115+
114116
<!--
115117
<li>Forum Viewer should use DNN Resource Manager to load module.css not load it directly (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1792">Issue 1792</a>)</li>
116118
<li>Remove legacy calendar.css associated with previously-removed date picker control (<a href="https://github.com/DNNCommunity/Dnn.CommunityForums/issues/1723">Issue 1723</a>)</li>

Dnn.CommunityForums/Services/Controllers/TagController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ private HttpResponseMessage Match(string matchString)
8383
{
8484
matchingTags = new DotNetNuke.Modules.ActiveForums.Controllers.TagController()
8585
.Find(
86-
"WHERE PortalId = @0 AND ModuleId = @1 AND TagName LIKE @2 ORDER By TagName",
86+
"WHERE PortalId = @0 AND ModuleId = @1 AND TagName <> '' AND TagName LIKE @2 ORDER By TagName",
8787
this.ActiveModule.PortalID,
8888
this.ForumModuleId,
8989
$"{DotNetNuke.Modules.ActiveForums.Services.ServicesHelper.CleanAndChopString(matchString, 20)}%")

Dnn.CommunityForums/Services/Controllers/UserController.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,13 @@ public HttpResponseMessage GetUsersForEditorMentions(int forumId, string query)
185185

186186
if (forum.FeatureSettings.UserMentionVisibility.Equals(DotNetNuke.Modules.ActiveForums.Enums.UserMentionVisibility.RegisteredUsers))
187187
{
188-
users.RemoveAll(user => user.IsAdmin);
188+
if (!this.UserInfo.IsAdmin && !this.UserInfo.IsSuperUser)
189+
{
190+
users.RemoveAll(user => user.IsAdmin);
191+
}
189192
}
190-
else if (forum.FeatureSettings.UserMentionVisibility.Equals(DotNetNuke.Modules.ActiveForums.Enums.UserMentionVisibility.Everyone))
193+
194+
if (forum.FeatureSettings.UserMentionVisibility.Equals(DotNetNuke.Modules.ActiveForums.Enums.UserMentionVisibility.Everyone) || this.UserInfo.IsSuperUser)
191195
{
192196
users.AddRange(
193197
DotNetNuke.Entities.Users.UserController.GetUsersByDisplayName(

Dnn.CommunityForums/controls/admin_manageforums_forumeditor.ascx

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -362,29 +362,44 @@ function toggleMentions(obj){
362362
};
363363
};
364364
365-
function showProp(obj,win){
365+
function showProp(obj, win) {
366366
var propertyWindow = document.getElementById(win);
367-
if (propertyWindow.style.display == '' || propertyWindow.style.display == 'block') {
367+
var $propertyWindow = $(propertyWindow);
368+
369+
if (propertyWindow.style.display === 'block') {
368370
propertyWindow.style.display = 'none';
369371
hideSelectBoxes();
370372
} else {
371-
propertyWindow.style.display = '';
372-
var $propertyWindow = $(propertyWindow);
373-
var elem = $(obj);
374-
var position = elem.position();
375-
//position.left += 15;
376-
//position.top = (position.top - ($propertyWindow.height() / 2));
377-
position.left += 650;
378-
position.top = (position.top + ($propertyWindow.height() / 2));
379-
position.width = $propertyWindow.innerWidth() + 20;
380-
position.height = $propertyWindow.innerHeight();
381-
382-
$propertyWindow.css(position);
383373
closeAllProp();
384374
displaySelectBoxes();
385-
propertyWindow.style.display = '';
375+
376+
$propertyWindow.css({
377+
visibility: 'hidden',
378+
display: 'block'
379+
});
380+
381+
var $elem = $(obj);
382+
var elemOffset = $elem.offset();
383+
var parentOffset = $propertyWindow.offsetParent().offset();
384+
var elemHeight = $elem.outerHeight();
385+
var popupHeight = $propertyWindow.outerHeight();
386+
387+
// Subtract the popup's offset parent position
388+
var left = elemOffset.left - parentOffset.left + $elem.outerWidth() + 8;
389+
var top = (elemOffset.top - parentOffset.top) + (elemHeight / 2) - (popupHeight / 2);
390+
391+
console.log('elemOffset:', elemOffset);
392+
console.log('parentOffset:', parentOffset);
393+
console.log('computed left:', left);
394+
console.log('computed top:', top);
395+
396+
$propertyWindow.css({
397+
left: left,
398+
top: top,
399+
visibility: 'visible'
400+
});
386401
}
387-
};
402+
}
388403
389404
390405
function addRole(){

Dnn.CommunityForums/controls/af_post.ascx.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -808,12 +808,19 @@ private void SaveTopic()
808808
var tagForm = string.Join(",", currentTopicTags);
809809
if (this.Request.Form["txtTags"] != null)
810810
{
811-
tagForm = tagForm + "," + this.Request.Form["txtTags"];
811+
if (string.IsNullOrEmpty(tagForm))
812+
{
813+
tagForm = this.Request.Form["txtTags"];
814+
}
815+
else
816+
{
817+
tagForm = tagForm + "," + this.Request.Form["txtTags"];
818+
}
812819
}
813820

814821
if (tagForm != string.Empty)
815822
{
816-
var tags = tagForm.Split(',').Distinct();
823+
var tags = tagForm.Split(',').Distinct().Where(tag => !string.IsNullOrEmpty(tag));
817824
foreach (var tag in tags)
818825
{
819826
var sTag = Utilities.CleanString(this.PortalId, tag.Trim(), false, DotNetNuke.Modules.ActiveForums.Enums.EditorType.TEXTBOX, false, false, this.ForumModuleId, string.Empty, false);
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
SET NOCOUNT ON
2+
GO
3+
4+
/* issue 1825 - begin - prevent & remove blank tags */
5+
6+
DELETE FROM {databaseOwner}[{objectQualifier}activeforums_Topics_Tags]
7+
WHERE TagId IN (SELECT TagId FROM {databaseOwner}[{objectQualifier}activeforums_Tags] WHERE TagName = '')
8+
GO
9+
10+
DELETE FROM {databaseOwner}[{objectQualifier}activeforums_Tags] WHERE TagName = ''
11+
GO
12+
13+
/* issue 1825 - end - prevent & remove blank tags */
14+
15+
/* --------------------- */

0 commit comments

Comments
 (0)