I've been searching high and low for an answer to this, but couldn't find any.
Is there any way to check when (DateTime) a node was deleted (moved to the bin) from the content tree? I have looked in the database, but haven't found a datetime stamp which indicates this.
I know that I can simple hook into the event API to save the datetime stamp whenever a node was moved to the bin (and remove the stamp when it's removed from the bin again), but I'm wondering if there's a built-in datetime stamp that I am not aware of?
Hi what are you trying to do? What i would probably do is create a new database table. On the on delete event get the current date. Save the date with the node id.
When you need to do a check just look up the id you need to check?
Thats just off the top of my head may not be practical.
That was the solutions I thought of myself. It doesn't seem like there's a built-in datetime saved when a node is deleted.
The functionality will ensure that nodes in the recycle bin that are older than 30 days are deleted permanently. I'll have to get my hands dirty writing some code then ;-)
Deleted date
Hi all,
I've been searching high and low for an answer to this, but couldn't find any.
Is there any way to check when (DateTime) a node was deleted (moved to the bin) from the content tree? I have looked in the database, but haven't found a datetime stamp which indicates this.
I know that I can simple hook into the event API to save the datetime stamp whenever a node was moved to the bin (and remove the stamp when it's removed from the bin again), but I'm wondering if there's a built-in datetime stamp that I am not aware of?
Thanks in advance! :-)
Hi what are you trying to do? What i would probably do is create a new database table. On the on delete event get the current date. Save the date with the node id.
When you need to do a check just look up the id you need to check?
Thats just off the top of my head may not be practical.
What is the functinoality for? :)
Charlie
Hi Charles,
Thanks a lot for your reply! :-)
That was the solutions I thought of myself. It doesn't seem like there's a built-in datetime saved when a node is deleted.
The functionality will ensure that nodes in the recycle bin that are older than 30 days are deleted permanently. I'll have to get my hands dirty writing some code then ;-)
The other thing you could do is on the content service there is a GetContentInRecycleBin()
You could get these (which returns IContent)
On that IContent will be a modified date. You could use that date + 30 days and delete anything from that date.
Charlie :)
is working on a reply...