This patch makes its possible to create custom blocks from the install profile.
The following lines were removed from install_add_block(), since i'm pretty sure it would never work.
if ($module == 'block') {
$box = db_fetch_object(db_query('SELECT * FROM {boxes} WHERE bid=%d', $delta));
db_query("INSERT INTO {boxes} (bid, body, info, format) VALUES (%d, '%s', '%s', '%s')", $box->bid, $box->body, $box->info, $box->format);
}
creating a new block now goes like this:
$delta = install_create_custom_block($body, $title, $format);
install_add_block('block', $delta, ...);
Comments
Comment #1
dwwThanks for the patch. However, this issue is duplicate with #185020: crud.inc logic for inserting to boxes. I think your approach is better, so I'll probably commit this patch (once I can more closely review and test it).