attached patch converts the locale deletions to the deletion API. tested as working.
| Comment | File | Size | Author |
|---|---|---|---|
| dapi_locale.patch | 3.8 KB | hunmonk |
attached patch converts the locale deletions to the deletion API. tested as working.
| Comment | File | Size | Author |
|---|---|---|---|
| dapi_locale.patch | 3.8 KB | hunmonk |
Comments
Comment #1
Crell commentedCode looks clean visually (at least at 2 am). I'm afraid my knowledge of both delete API and locale is too limited to do more than that. Sorry hunmonk. :-)
Comment #2
gábor hojtsyCode looks good. I have two questions though, which have roots in how few insight I have about the deletion API :)
1. _submit functons were converted to _post functions to protect them from being called by the form submit system? Or what is the reason behind this?
2. How to go about implementing conditional deletions. It occured to us lately, that it is not as simple as removing source strings and translations, if plural forms are involved (because plural forms are stored in a linked list format, so we should not break the chain by arbitrarily removing elements from the chain). There conditionals would be required to decide on deleting or not. I don't see how this system would allow that, but we will need a bugfix for that soon. (This is buggy in Drupal 6.x-dev now).
Comment #3
hunmonk commentedeasy answer -- the workflow for deletions, in brief, is now:
because all deletion data is built first, we have to separate out deletion actions that logically happen after deletion -- otherwise you get things like user messages saying "the node has been deleted" even though a module aborted the deletion.
i haven't seen a situation yet where there isn't enough data available to calculate the conditional deletions before any data actually starts getting deleted. calculating them *might* be a bit more involved since you can't just simply examine what's left in the database, but should still be possible. the main point of the deletion API's existence is "show me what you're going to to before you do it", which in certain cases might involve a bit more work. i can tell you i've converted over pretty much all of core to this workflow, and haven't had any problems with it.
since i've already tested this patch, and it's gotten code reviews, i think it's RTBC.
Comment #4
hunmonk commentedComment #5
webchickDeletion API was rolled back.