diff --git a/ExpandableText/Components/ExpandableTextHtmlController.cs b/ExpandableText/Components/ExpandableTextHtmlController.cs index 47187ef..33fad0b 100644 --- a/ExpandableText/Components/ExpandableTextHtmlController.cs +++ b/ExpandableText/Components/ExpandableTextHtmlController.cs @@ -25,13 +25,14 @@ using DotNetNuke.Common; using DotNetNuke.Common.Utilities; using DotNetNuke.Entities.Modules; +using DotNetNuke.Services.Search.Entities; namespace ICG.Modules.ExpandableTextHtml.Components { /// /// This is the controller class providing functionality to the module /// - public class ExpandableTextHtmlController : IPortable + public class ExpandableTextHtmlController : ModuleSearchBase, IPortable { #region Public Methods @@ -123,6 +124,52 @@ public void DeleteExpandableTextHtml(int moduleId, int itemId) //#endregion + #region ModuleSearchBase Members + + /// + /// Gets the search documents for the module. + /// + /// The module information. + /// The begin date in UTC. + /// A collection of search documents. + public override IList GetModifiedSearchDocuments(ModuleInfo moduleInfo, DateTime beginDateUtc) + { + var searchDocuments = new List(); + + // Get all expandable text items for this module, ordered by last updated date + var items = GetExpandableTextHtmls(moduleInfo.ModuleID, "ORDER BY LastUpdated"); + + foreach (var item in items) + { + // Only include items that have been updated since the begin date + if (item.LastUpdated.ToUniversalTime() >= beginDateUtc) + { + var searchDoc = new SearchDocument + { + UniqueKey = $"ETH_{moduleInfo.ModuleID}_{item.ItemId}", + PortalId = moduleInfo.PortalID, + TabId = moduleInfo.TabID, + ModuleId = moduleInfo.ModuleID, + ModuleDefId = moduleInfo.ModuleDefID, + Title = item.Title, + Body = item.Body, + Description = item.Title, + ModifiedTimeUtc = item.LastUpdated.ToUniversalTime(), + AuthorUserId = -1, // Default author as system since we don't track the author in this module + IsActive = true, // Assuming all items are active + CultureCode = moduleInfo.CultureCode, + Keywords = string.Empty // No specific keywords for this module + }; + + searchDocuments.Add(searchDoc); + } + } + + return searchDocuments; + } + + #endregion + #region IPortable Members ///// diff --git a/ExpandableText/ManifestAssets/ReleaseNotes.txt b/ExpandableText/ManifestAssets/ReleaseNotes.txt index 610564f..42a9ef8 100644 --- a/ExpandableText/ManifestAssets/ReleaseNotes.txt +++ b/ExpandableText/ManifestAssets/ReleaseNotes.txt @@ -1,4 +1,9 @@ -

Version 06.01.00 - April 21st, 2012

+

Version 06.02.00 - [Current Date]

+
    +
  • Added support for DNN 10.x Search Integration using ModuleSearchBase
  • +
+ +

Version 06.01.00 - April 21st, 2012

  • Resolved issues installing to SQL Azure
  • Updated module to support proper installation if a failure occured during initial install