This is a patch to block.inc that allows several extra, optional, arguments to be passed to the install_set_block() function. Backwards compatibility is not broken.

Please let me know if this is useful, or if you can suggest improvements.

Comments

James Andres’s picture

Title: Making install_set_block() more flexible » Adding extra, optional, arguments to install_set_block()
James Andres’s picture

StatusFileSize
new1.68 KB

Left some debugging stuff in the first patch. Use this one instead.

damienmckenna’s picture

jamesandres: I've noticed that the blocks are not compiled during the install process but rather afterwards, which can be verified by running a bare install and looking at the blocks table right afterwards. Do you use _block_rehash() to compile the initial list first, so there are no records for install_set_block() to update?

damienmckenna’s picture

I've noticed a problem.. I assign a new default theme but then when I run block functions, e.g. _block_rehash() to re-hash all of the available blocks, it still happens on the Drupal default Minnelli rather than on the theme I've added.

damienmckenna’s picture

damienmckenna’s picture

Status: Needs review » Reviewed & tested by the community

This patch works well, I used it as part of a fairly complete install profile.

James Andres’s picture

Status: Reviewed & tested by the community » Fixed

Appears to be no complaints, committing.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.