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.

Comments

pwolanin’s picture

StatusFileSize
new6.27 KB

per IRC discussion - minor re-roll to try to properly prefix tables. Seems to work under MySQL with prefixed tables.

hunmonk’s picture

tested and working beautifully on postgres w/ table prefixing

drewish’s picture

Status: Needs review » Needs work

i 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.

hunmonk’s picture

Status: Needs work » Needs review

coding style fixes as mentioned above.

hunmonk’s picture

StatusFileSize
new6.35 KB

coding style fixes as mentioned above.

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

i 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.

hunmonk’s picture

Version: 5.x-1.x-dev » 7.x-1.x-dev
Status: Reviewed & tested by the community » Needs review
StatusFileSize
new6.92 KB

patch 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...

hunmonk’s picture

StatusFileSize
new6.44 KB

minor re-roll for the D5 version -- it was missing the conditional deletion from the term_node table.

moshe weitzman’s picture

Status: Needs review » Fixed

committed to d5 and head. thx.

Anonymous’s picture

Status: Fixed » Closed (fixed)