Skip to content

Commit 35f405a

Browse files
committed
Fixing DNN8 search due to changes from DNN9
1 parent 37c0ccd commit 35f405a

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

branches/DNN_5/Components/Controllers/ThreadController.vb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,9 @@ Namespace DotNetNuke.Modules.Forum
349349
For Each thread In ThreadSearchCollection
350350
'log.Debug("Search found: " + thread.Subject)
351351
Dim sitem As Search.Entities.SearchDocument = New Search.Entities.SearchDocument()
352-
sitem.Description = HtmlUtils.ConvertToText(HttpUtility.HtmlDecode(thread.Body))
352+
sitem.Description = HtmlUtils.Clean(System.Web.HttpUtility.HtmlDecode(thread.Body), False)
353353
sitem.AuthorUserId = thread.CreatedByUser
354-
sitem.Body = HtmlUtils.Shorten(HtmlUtils.ConvertToText(HttpUtility.HtmlDecode(thread.Body)), 100, "...")
354+
sitem.Body = HtmlUtils.Clean(System.Web.HttpUtility.HtmlDecode(thread.Body), False)
355355
sitem.IsActive = True
356356
'sitem.Keywords = Nothing
357357
'log.Debug("UpdateDate: " + thread.UpdatedDate.ToString)
@@ -361,7 +361,7 @@ Namespace DotNetNuke.Modules.Forum
361361
'sitem.NumericKeys
362362
'sitem.Permissions
363363
sitem.PortalId = moduleInfo.PortalID
364-
'sitem.QueryString =
364+
sitem.QueryString = "forumid=" & thread.ForumID & "&postid=" & thread.PostID & "&scope=posts"
365365
'sitem.RoleId
366366
'sitem.SearchTypeId
367367
sitem.TabId = moduleInfo.TabID
@@ -379,7 +379,6 @@ Namespace DotNetNuke.Modules.Forum
379379
sitem.Title = HttpUtility.HtmlDecode(thread.Subject)
380380
sitem.UniqueKey = thread.PostID.ToString
381381

382-
sitem.Url = New Uri(Links.ContainerViewQueryLink(moduleInfo.PortalID, moduleInfo.TabID, thread.ForumID, thread.PostID, thread.Subject)).PathAndQuery
383382
retval.Add(sitem)
384383
Next
385384
End If

branches/DNN_5/Components/Utilities/Links.vb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -443,13 +443,6 @@ Namespace DotNetNuke.Modules.Forum.Utilities
443443
Return DotNetNuke.Common.Globals.FriendlyUrl(TabInfo, Path, CreateFriendlySlug(PostTitle)) & "#" & PostId
444444

445445
End Function
446-
Public Shared Function ContainerViewQueryLink(ByVal PortalId As Integer, ByVal TabId As Integer, ByVal ForumId As Integer, ByVal PostId As Integer, ByVal PostTitle As String) As String
447-
Dim pSettings As PortalSettings = ForumPortalSettings.CreateNewPortalSettings(PortalId)
448-
Dim Path As String
449-
Dim TabInfo As DotNetNuke.Entities.Tabs.TabInfo = TabController.Instance.GetTab(TabId, PortalId, False)
450-
Path = "~/default.aspx?tabid=" & TabId & "&forumid=" & ForumId & "&postid=" & PostId & "&scope=posts"
451-
Return DotNetNuke.Common.Globals.FriendlyUrl(TabInfo, Path, CreateFriendlySlug(PostTitle), pSettings) & "#" & PostId
452-
End Function
453446

454447
''' <summary>
455448
''' Navigates user to specific page of results for a thread view.

0 commit comments

Comments
 (0)