a0e4492a35
with a custom IDatabaseFactory (mostly for testing). Changes AuditTrail to internal so the public way is just with the 'Audit' class. Fixed ThreadSafetyServiceTests which was failing with the new AuditTrail stuff because of the Database instances, this is not solved with the new PerThreadDatabaseFactory for the unit test. Created new 'UmbracoDatabase' object which inherits from the PetaPoco one so that we can future proof the implementation as we might want some custom logic on there. Now the IDatabaseFactory returns an UmbracoDatabase instead of just Database.
13 lines
356 B
C#
13 lines
356 B
C#
namespace Umbraco.Core.Auditing
|
|
{
|
|
/// <summary>
|
|
/// Public method to create new audit trail
|
|
/// </summary>
|
|
public static class Audit
|
|
{
|
|
public static void Add(AuditTypes type, string comment, int userId, int objectId)
|
|
{
|
|
AuditTrail.Current.AddEntry(type, comment, userId, objectId);
|
|
}
|
|
}
|
|
} |