Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Here is the code:
void CleanUp(IContent root)
var descendants = root.Descendants();
var date = DateTime.Now.AddDays(1);
foreach(var item in descendants)
And it cleans versions, but not a history in page Info Tab
How to clean info tab history programmaticaly?
I believe the code here is removing the version but not the entries from the Audit Table (which is what makes up the actions on the info tab).
however the entries in the audit table are merely a history of events they shouldn't affect how the site performs.
the AuditService lets you add stuff to the audit tables, but other than cleaning all the logs (based on age) via CleanLogs, I don't think you can remove speicif entries based on things like the content Id.
AuditService.CleanLogs(60); // clean the logs of everything over an hour old
There is no AuditService.CleanLogs() method in Umbraco 7 :(
looks like the audit service is write only in Umbraco 7 - you will probably have to do this via SQL if you really want it cleaned out.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted