Skip to content

Commit

Permalink
DNN-10289:Message/Email Tokens Don't Reflect SSL
Browse files Browse the repository at this point in the history
- changes make in LocalizationProvider
  • Loading branch information
Mohtshum committed Nov 16, 2017
1 parent 41ac727 commit 898cd77
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,19 @@ public string GetString(string key, string resourceFileRoot, string language, Po
Logger.WarnFormat("Missing localization key. key:{0} resFileRoot:{1} threadCulture:{2} userlan:{3}", key, resourceFileRoot, Thread.CurrentThread.CurrentUICulture, language);
}

return string.IsNullOrEmpty(resourceValue) ? string.Empty : resourceValue;
return string.IsNullOrEmpty(resourceValue) ? string.Empty : RemoveHttpUrlsIfSiteisSSLEnabled(resourceValue);
}

private string RemoveHttpUrlsIfSiteisSSLEnabled(string resourceValue)
{
var portalSettings = PortalController.Instance.GetCurrentPortalSettings();

if (portalSettings.SSLEnabled)
{
resourceValue = resourceValue.Replace(@"http:", @"https:");
}

return resourceValue;
}

/// <summary>
Expand Down

0 comments on commit 898cd77

Please sign in to comment.