public
DotNetNuke.Services.Search.SearchItemInfoCollection GetSearchItems(DotNetNuke.Entities.Modules.ModuleInfo ModInfo)
{
DotNetNuke.Services.Search.SearchItemInfoCollection objCollection =
new
DotNetNuke.Services.Search.SearchItemInfoCollection();
foreach
(Business.LogInfo objInfo
in
Business.LogController.GetByPortalID_Log(ModInfo.PortalID))
{
try
{
DotNetNuke.Services.Search.SearchItemInfo objSearchInfo =
new
DotNetNuke.Services.Search.SearchItemInfo();
string
strContent =
string
.Join(
" "
,
new
string
[] {objInfo.LogID.ToString() ,objInfo.UserID.ToString() ,objInfo.ScriptID.ToString() ,objInfo.MovieID.ToString() ,objInfo.LogDate.ToString() ,objInfo.IP.ToString() ,objInfo.Version.ToString() ,objInfo.Build.ToString() ,objInfo.UserCode.ToString() ,objInfo.AdsUrl.ToString() ,
" "
});
objSearchInfo.Title = objInfo.LogID.ToString();
objSearchInfo.Author = DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo().UserID;
objSearchInfo.Content = strContent;
if
(strContent.Length > 200)
{
objSearchInfo.Content = strContent.Substring(0,200);
}
objSearchInfo.Description = strContent;
if
(strContent.Length < 2000)
{
objSearchInfo.Description = strContent.Substring(0,2000);
}
objSearchInfo.PubDate = DateTime.Now;
objSearchInfo.ModuleId = ModInfo.ModuleID;
objSearchInfo.SearchKey = strContent;
if
(strContent.Length < 100)
{
objSearchInfo.SearchKey = strContent.Substring(0,100);
}
objSearchInfo.GUID =
"ctl=LogView"
+
"&LogID="
+objInfo.LogID.ToString() +
"&mid="
+ModInfo.ModuleID.ToString();
objSearchInfo.ImageFileId = -1;
objCollection.Add(objSearchInfo);
}
catch
{}
}
return
objCollection;
}