Skip to content

Commit 43ada6e

Browse files
author
Sacha Trauwaen
committed
Merge branch 'develop' of https://github.com/sachatrauwaen/OpenContent into develop
2 parents 0e188c6 + b2707cd commit 43ada6e

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

OpenContent/Components/Datasource/DnnUsersDataSource.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ public override void Add(DataSourceContext context, Newtonsoft.Json.Linq.JToken
249249
{
250250
user.DisplayName = user.FirstName + " " + user.LastName;
251251
}
252-
user.Membership.Approved = true; //chkAuthorize.Checked;
252+
user.Membership.Approved = data["Approved"] != null ? ((bool)(data["Approved"] as JValue)?.Value) : true;
253253
var newUser = user;
254254
var createStatus = UserController.CreateUser(ref newUser);
255255
bool notify = true;

OpenContent/Components/FeatureController.cs

+3-11
Original file line numberDiff line numberDiff line change
@@ -185,17 +185,9 @@ public override IList<SearchDocument> GetModifiedSearchDocuments(ModuleInfo modI
185185

186186
if (DnnLanguageUtils.IsMultiLingualPortal(modInfo.PortalID))
187187
{
188-
if (string.IsNullOrEmpty(modInfo.CultureCode))
189-
{
190-
// it's a neutral language module according to DNN, which means we will need to add the neutral language content too
191-
var culture = ps.DefaultLanguage;
192-
var localizedData = GetLocalizedContent(content.Data, culture, modInfo);
193-
// pass "" as culture to indicate we're indexing the neutral language here
194-
searchDoc = CreateSearchDocument(ps, modInfo, module.Settings, localizedData, content.Id, "", content.Title, content.LastModifiedOnDate.ToUniversalTime());
195-
searchDocuments.Add(searchDoc);
196-
App.Services.Logger.Trace($"Indexing content {modInfo.ModuleID}|{culture} - OK! {searchDoc.Title} ({modInfo.TabID}) of {content.LastModifiedOnDate.ToUniversalTime()}");
197-
}
198-
// now start creating the docs for specific cultures
188+
// start creating the docs for specific cultures
189+
// we don't add a search docuement with the neutral language anymore,
190+
// because that results in duplicate documents in search results
199191
foreach (var portalLocale in portalLocales.Keys)
200192
{
201193
var localizedData = GetLocalizedContent(content.Data, portalLocale, modInfo);

0 commit comments

Comments
 (0)