diff --git a/umbraco/cms/businesslogic/workflow/Notification.cs b/umbraco/cms/businesslogic/workflow/Notification.cs
index 8d1e7c07a2..71faa2b6ed 100644
--- a/umbraco/cms/businesslogic/workflow/Notification.cs
+++ b/umbraco/cms/businesslogic/workflow/Notification.cs
@@ -1,17 +1,15 @@
using System;
-using System.Data;
+using System.Collections.Generic;
using System.Net.Mail;
using System.Runtime.CompilerServices;
using System.Text;
using System.Web;
-using System.Collections.Generic;
using umbraco.BusinessLogic;
using umbraco.cms.businesslogic.property;
using umbraco.cms.businesslogic.web;
-using umbraco.interfaces;
using umbraco.DataLayer;
+using umbraco.interfaces;
using umbraco.IO;
-using System.Collections;
namespace umbraco.cms.businesslogic.workflow
{
@@ -22,16 +20,17 @@ namespace umbraco.cms.businesslogic.workflow
///
public class Notification
{
+ ///
+ /// Private constructor as this object should not be allowed to be created currently
+ ///
+ private Notification()
+ {
+ }
public int NodeId { get; private set; }
public int UserId { get; private set; }
public char ActionId { get; private set; }
- ///
- /// Private constructor as this object should not be allowed to be created currently
- ///
- private Notification() { }
-
///
/// Gets the SQL helper.
///
@@ -59,7 +58,7 @@ namespace umbraco.cms.businesslogic.workflow
Log.Add(LogTypes.Notify, User.GetUser(0), Node.Id,
"Notification about " + ui.Text(Action.Alias, u) + " sent to " + u.Name + " (" + u.Email +
")");
- sendNotification(user, u, (Document) Node, Action);
+ sendNotification(user, u, (Document)Node, Action);
}
}
catch (Exception notifyExp)
@@ -68,7 +67,7 @@ namespace umbraco.cms.businesslogic.workflow
}
}
}
-
+
///TODO: Include update with html mail notification and document contents
private static void sendNotification(User performingUser, User mailingUser, Document documentObject,
IAction Action)
@@ -76,11 +75,11 @@ namespace umbraco.cms.businesslogic.workflow
// retrieve previous version of the document
DocumentVersionList[] versions = documentObject.GetVersions();
int versionCount = (versions.Length > 1) ? (versions.Length - 2) : (versions.Length - 1);
- Document oldDoc = new Document(documentObject.Id, versions[versionCount].Version);
+ var oldDoc = new Document(documentObject.Id, versions[versionCount].Version);
// build summary
- StringBuilder summary = new StringBuilder();
- var props = documentObject.getProperties;
+ var summary = new StringBuilder();
+ Property[] props = documentObject.getProperties;
foreach (Property p in props)
{
// check if something was changed and display the changes otherwise display the fields
@@ -94,51 +93,72 @@ namespace umbraco.cms.businesslogic.workflow
// make sure to only highlight changes done using TinyMCE editor... other changes will be displayed using default summary
///TODO PPH: Had to change this, as a reference to the editorcontrols is not allowed, so a string comparison is the only way, this should be a DIFF or something instead..
- if (p.PropertyType.DataTypeDefinition.DataType.ToString() == "umbraco.editorControls.tinymce.TinyMCEDataType" &&
- string.Compare( oldText, newText ) != 0)
+ if (p.PropertyType.DataTypeDefinition.DataType.ToString() ==
+ "umbraco.editorControls.tinymce.TinyMCEDataType" &&
+ string.Compare(oldText, newText) != 0)
{
summary.Append("
");
summary.Append("| Note: | ");
- summary.Append(" Red for deleted characters Yellow for inserted characters | ");
+ summary.Append(
+ " Red for deleted characters Yellow for inserted characters | ");
summary.Append("
");
summary.Append("");
- summary.Append("| New " + p.PropertyType.Name + " | ");
- summary.Append("" + replaceLinks(CompareText(oldText, newText, true, false, "", string.Empty)) + " | ");
+ summary.Append(" New " +
+ p.PropertyType.Name + " | ");
+ summary.Append("" +
+ replaceLinks(CompareText(oldText, newText, true, false,
+ "", string.Empty)) +
+ " | ");
summary.Append("
");
summary.Append("");
- summary.Append("| Old " + oldProperty.PropertyType.Name + " | ");
- summary.Append("" + replaceLinks(CompareText(newText, oldText, true, false, "", string.Empty)) + " | ");
+ summary.Append(" Old " +
+ oldProperty.PropertyType.Name + " | ");
+ summary.Append("" +
+ replaceLinks(CompareText(newText, oldText, true, false,
+ "", string.Empty)) +
+ " | ");
summary.Append("
");
}
else
{
summary.Append("");
- summary.Append("| " + p.PropertyType.Name + " | ");
- summary.Append("