Greetings
Been a while since I’ve been on the forums. Still loving modx though ...
A client recently asked for the ability to purge specific deleted documents rather than just blatting the lot using "Purge". I had a look through the forums and coulnd’t find anything on this so I investigated this idea with Doc Manager in mind and I came up with a simple solution for this.
On the Other Properties page I have added "Purge Deleted Docs" to the available settings dropdown and then document IDs can be entered using the normal Doc Manager notation.
The purging script is basically a hack of the remove_content.processor.php file (I’m not sure if the invoking of OnBeforeEmptyTrash and OnEmptyTrash is required for this but I left it in anyway) but it’s tweaked slightly to only delete records that are in the set of IDs entered.
If any one is interested I’m attached the updated Doc Manager module code (taken from the 0.9.6.3 build) to this post. Please note that I have only added language options to the English file.
If anyone has any good ideas about this, or a more elegant solution would love to hear about it.
Cheers
David
UPDATE: I should mention that the files that have been tweaked are as follows:
includes/interaction.inc
includes/process.inc
js/functions.js
lang/english.inc