Fixed and closed #419: email notifications display the display name instead of the username.
This commit is contained in:
parent
800fd8fb79
commit
e36df77aa7
2 changed files with 8 additions and 6 deletions
|
@ -16,5 +16,5 @@ using System.Reflection;
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("3.0.1.439")]
|
[assembly: AssemblyVersion("3.0.1.440")]
|
||||||
[assembly: AssemblyFileVersion("3.0.1.439")]
|
[assembly: AssemblyFileVersion("3.0.1.440")]
|
||||||
|
|
|
@ -765,7 +765,7 @@ namespace ScrewTurn.Wiki {
|
||||||
|
|
||||||
EmailTools.AsyncSendMassEmail(recipients, Settings.SenderEmail,
|
EmailTools.AsyncSendMassEmail(recipients, Settings.SenderEmail,
|
||||||
Settings.WikiTitle + " - " + title,
|
Settings.WikiTitle + " - " + title,
|
||||||
body.Replace("##PAGE##", title).Replace("##USER##", content.User).Replace("##DATETIME##",
|
body.Replace("##PAGE##", title).Replace("##USER##", author != null ? Users.GetDisplayName(author) : "anonymous").Replace("##DATETIME##",
|
||||||
Preferences.AlignWithServerTimezone(content.LastModified).ToString(Settings.DateTimeFormat)).Replace("##COMMENT##",
|
Preferences.AlignWithServerTimezone(content.LastModified).ToString(Settings.DateTimeFormat)).Replace("##COMMENT##",
|
||||||
(string.IsNullOrEmpty(content.Comment) ? Exchanger.ResourceExchanger.GetResource("None") : content.Comment)).Replace("##LINK##",
|
(string.IsNullOrEmpty(content.Comment) ? Exchanger.ResourceExchanger.GetResource("None") : content.Comment)).Replace("##LINK##",
|
||||||
Settings.MainUrl + Tools.UrlEncode(page.FullName) + Settings.PageExtension).Replace("##WIKITITLE##", Settings.WikiTitle),
|
Settings.MainUrl + Tools.UrlEncode(page.FullName) + Settings.PageExtension).Replace("##WIKITITLE##", Settings.WikiTitle),
|
||||||
|
@ -887,12 +887,14 @@ namespace ScrewTurn.Wiki {
|
||||||
usersToNotify.Add(user);
|
usersToNotify.Add(user);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
usersToNotify.Add(new UserInfo("admin", "Administrator", Settings.ContactEmail,
|
usersToNotify.Add(new UserInfo("admin", "Administrator", Settings.ContactEmail, true, DateTime.Now, null));
|
||||||
true, DateTime.Now, null));
|
|
||||||
|
UserInfo actualUser = Users.FindUser(author);
|
||||||
|
string displayName = actualUser == null ? author : Users.GetDisplayName(actualUser);
|
||||||
|
|
||||||
string subject = Settings.WikiTitle + " - " + Exchanger.ResourceExchanger.GetResource("ApproveRejectDraft") + ": " + title;
|
string subject = Settings.WikiTitle + " - " + Exchanger.ResourceExchanger.GetResource("ApproveRejectDraft") + ": " + title;
|
||||||
string body = Settings.Provider.GetMetaDataItem(MetaDataItem.ApproveDraftMessage, null);
|
string body = Settings.Provider.GetMetaDataItem(MetaDataItem.ApproveDraftMessage, null);
|
||||||
body = body.Replace("##PAGE##", title).Replace("##USER##", author).Replace("##DATETIME##",
|
body = body.Replace("##PAGE##", title).Replace("##USER##", displayName).Replace("##DATETIME##",
|
||||||
Preferences.AlignWithServerTimezone(DateTime.Now).ToString(Settings.DateTimeFormat)).Replace("##COMMENT##",
|
Preferences.AlignWithServerTimezone(DateTime.Now).ToString(Settings.DateTimeFormat)).Replace("##COMMENT##",
|
||||||
string.IsNullOrEmpty(comment) ? Exchanger.ResourceExchanger.GetResource("None") : comment).Replace("##LINK##",
|
string.IsNullOrEmpty(comment) ? Exchanger.ResourceExchanger.GetResource("None") : comment).Replace("##LINK##",
|
||||||
Settings.MainUrl + UrlTools.BuildUrl("Edit.aspx?Page=", Tools.UrlEncode(currentPage.FullName))).Replace("##LINK2##",
|
Settings.MainUrl + UrlTools.BuildUrl("Edit.aspx?Page=", Tools.UrlEncode(currentPage.FullName))).Replace("##LINK2##",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue