[drupal-devel] [bug] hook_delete_confirm -- custom controls for modules during delete cycle

thehunmonkgroup drupal-devel at drupal.org
Wed Jul 13 22:53:05 UTC 2005


Issue status update for 
http://drupal.org/node/26649
Post a follow up: 
http://drupal.org/project/comments/add/26649

 Project:      Drupal
 Version:      4.6.2
 Component:    base system
 Category:     bug reports
 Priority:     normal
 Assigned to:  thehunmonkgroup
 Reported by:  thehunmonkgroup
 Updated by:   thehunmonkgroup
 Status:       patch
 Attachment:   http://drupal.org/files/issues/node_module_hook_delete_confirm.patch (547 bytes)

the proposed patch creates a hook_delete_confirm, which is called from
node_delete during the
confirmation cycle.  this hook allows modules to inject custom control
structures into the deletion
process, as they don't currently have this ability.  this is needed,
for example, in the
eventrepeat.module that i'm creating, which handles repeating/recurring
events for event.module.
without a solution such as this, there is no way for the module to put
in options for different
kinds of deletions--ex. 'this occurance only', 'this and all future
occurances', 'all occurances'.
click here [1] for a screenshot of what this hook looks like in
action...


i've tested this patch and it works great, even when multiple modules
are calling
hook_delete_confirm.  i'd also be happy to write the documentation for
hook_delete_confirm if this
patch gets accepted.
[1] http://www.apartmentlines.com/hook_delete_confirm_screenshot.PNG




thehunmonkgroup




More information about the drupal-devel mailing list