Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bo Damgaard Mortensen 719 posts 1207 karma points
    Jun 05, 2014 @ 14:01
    Bo Damgaard Mortensen
    0

    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! :-)

  • Charles Afford 1163 posts 1709 karma points
    Jun 08, 2014 @ 12:22
    Charles Afford
    0

    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

  • Bo Damgaard Mortensen 719 posts 1207 karma points
    Jun 08, 2014 @ 21:35
    Bo Damgaard Mortensen
    0

    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 ;-)

  • Charles Afford 1163 posts 1709 karma points
    Jun 09, 2014 @ 09:40
    Charles Afford
    0

    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 :)

Please Sign in or register to post replies

Write your reply to:

Draft