Over at http://drupal.org/node/154033#comment-263588 I finally closely reviewed a DAPI-related patch. I found that the array you pass to drupal_delete_confirm() has a few ambiguous, confusing keys, in particular: 'path' vs. 'destination'. :(
- Text for the "yes" button
- Text for the "no" button
- Path to redirect to after submitting the form
- Path to go to when you hit "cancel"
Obviously, "path" is the outcast here. In IRC, hunmonk, UnConeD and I discussed a few alternatives:
- A nested array, something like:
'yes' => array(
'button' => t('Do it now!'),
'path' => '/some/path',
'no' => array(
'button' => t('No thanks'),
'path' => '/somewhere/else',
- Something wonky like: 'yes', 'yes_destination', 'no', 'no_destination'.
- Just rename 'path' to 'cancel'.
Choice (3) here seems like the easiest, and probably best option. Any other bright ideas before someone rolls a patch? It'd be great to do something about this before a) the code freeze and b) too many more DAPI conversion patches are done.