Fixed #514: recent changes are never repeated in case of similar subsequent edits.
This commit is contained in:
parent
fb90ca2400
commit
2c65f30a1c
2 changed files with 16 additions and 2 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.2.523")]
|
[assembly: AssemblyVersion("3.0.2.524")]
|
||||||
[assembly: AssemblyFileVersion("3.0.2.523")]
|
[assembly: AssemblyFileVersion("3.0.2.524")]
|
||||||
|
|
|
@ -36,6 +36,20 @@ namespace ScrewTurn.Wiki {
|
||||||
/// <param name="change">The change.</param>
|
/// <param name="change">The change.</param>
|
||||||
/// <param name="descr">The description (optional).</param>
|
/// <param name="descr">The description (optional).</param>
|
||||||
public static void AddChange(string page, string title, string messageSubject, DateTime dateTime, string user, Change change, string descr) {
|
public static void AddChange(string page, string title, string messageSubject, DateTime dateTime, string user, Change change, string descr) {
|
||||||
|
RecentChange[] allChanges = GetAllChanges();
|
||||||
|
if(allChanges.Length > 0) {
|
||||||
|
RecentChange lastChange = allChanges[allChanges.Length - 1];
|
||||||
|
if(lastChange.Page == page && lastChange.Title == title &&
|
||||||
|
lastChange.MessageSubject == messageSubject + "" &&
|
||||||
|
lastChange.User == user &&
|
||||||
|
lastChange.Change == change &&
|
||||||
|
(dateTime - lastChange.DateTime).TotalMinutes <= 60) {
|
||||||
|
|
||||||
|
// Skip this change
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Settings.Provider.AddRecentChange(page, title, messageSubject, dateTime, user, change, descr);
|
Settings.Provider.AddRecentChange(page, title, messageSubject, dateTime, user, change, descr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue