Hello!

I'm creating a dashboard for my site using homebox which uses blocks for the widgets. Chaos Blocks is a great tool for doing this, because I'm creating a ton of blocks which is painful in straight Drupal.

However, homebox is passing its special per-user settings to hook_block() via the $edit argument on $op == 'view'. But ctools_block_handle_block() doesn't pass it along. Of course, just passing it could cause problems, because what if the block doesn't care about homebox!

Attached is a patch attempting to fix it. Let me know what you think!

Regards,
David.

CommentFileSizeAuthor
#2 homebox-compat.patch987 bytesdsnopek
homebox-compat.patch777 bytesdsnopek
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

neclimdul’s picture

I don't see a problem with just passing $edit to all the callbacks functions. It'll be backwards compatible(as if that mattered since there isn't a release) because arguments that aren't in the function definition will just be dropped by PHP.

Thanks for your interest and would love to have you test this!

dsnopek’s picture

FileSize
987 bytes

Sounds good to me! Attached is a new patch that always passes $edit to all callbacks. It works fine in my use case!

Best regards,
David.

neclimdul’s picture

Status: Needs review » Fixed

Looks great. Committed and pushed.

Status: Fixed » Closed (fixed)

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