attached patch abstracts the content generation functionality further:
- adds postgres compatibility
- moves the main content generation out of the submit function, and into a dedicated function in the .inc file -- this will be quite useful for install profiles that wish to generate content.
- moved the checkbox on the generate content form to the bottom -- it looked a bit weird in between the textfields
patch has been tested on mysql and postgres, and all seems to be functioning perfectly.
note that we'll need to take a slightly different approach to applying this to HEAD, because of the schema stuff. i'm happy to roll that patch after this one gets in.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | devel_generate_content_1.patch | 6.44 KB | hunmonk |
| #7 | generate_content_6.patch | 6.92 KB | hunmonk |
| #5 | devel_generate_content_0.patch | 6.35 KB | hunmonk |
| #1 | better_generate_2.patch | 6.27 KB | pwolanin |
| devel_generate_content.patch | 6.21 KB | hunmonk |
Comments
Comment #1
pwolanin commentedper IRC discussion - minor re-roll to try to properly prefix tables. Seems to work under MySQL with prefixed tables.
Comment #2
hunmonk commentedtested and working beautifully on postgres w/ table prefixing
Comment #3
drewish commentedi like the functionality but there's a ton of tabs in there, as well as some coding style violations,
if ($foo) {}shouldn't all be on one line. comments should be proper sentences.Comment #4
hunmonk commentedcoding style fixes as mentioned above.
Comment #5
hunmonk commentedcoding style fixes as mentioned above.
Comment #6
moshe weitzman commentedi detest generating content this way (should use node_save() or drupal_execute()). but it is our current way, so fine. the patch looks ok to me.
any committer is welcome to commit this, on the condition that no patch hits 5.x until HEAD is patched. promises are ok, but code is gold :). devel_generate is hardly a moving target.
Comment #7
hunmonk commentedpatch for D6, tested and working on both mysql and postgresql.
somebody please review this patch, as it requires a different approach than the D5 version...
Comment #8
hunmonk commentedminor re-roll for the D5 version -- it was missing the conditional deletion from the term_node table.
Comment #9
moshe weitzman commentedcommitted to d5 and head. thx.
Comment #10
(not verified) commented