Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into develop
  • Loading branch information
Sacha Trauwaen committed May 22, 2024
2 parents 0e188c6 + b2707cd commit 43ada6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion OpenContent/Components/Datasource/DnnUsersDataSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public override void Add(DataSourceContext context, Newtonsoft.Json.Linq.JToken
{
user.DisplayName = user.FirstName + " " + user.LastName;
}
user.Membership.Approved = true; //chkAuthorize.Checked;
user.Membership.Approved = data["Approved"] != null ? ((bool)(data["Approved"] as JValue)?.Value) : true;
var newUser = user;
var createStatus = UserController.CreateUser(ref newUser);
bool notify = true;
Expand Down
14 changes: 3 additions & 11 deletions OpenContent/Components/FeatureController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,17 +185,9 @@ public override IList<SearchDocument> GetModifiedSearchDocuments(ModuleInfo modI

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

0 comments on commit 43ada6e

Please sign in to comment.