diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-08-15 06:50:29 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-08-15 06:50:29 +0000 |
commit | 5ff1f14447ead6a55da88fe8116ab38e21623c7e (patch) | |
tree | 4ebfbf07b2c2e08d8687ee0116bc64b493ccba4a /modules | |
parent | f2f34a87f84b420cc5a5df16820e46b693cf911a (diff) | |
download | brdo-5ff1f14447ead6a55da88fe8116ab38e21623c7e.tar.gz brdo-5ff1f14447ead6a55da88fe8116ab38e21623c7e.tar.bz2 |
#545580 by moshe weitzman: Simplify block render structure.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/block/block.module | 6 | ||||
-rw-r--r-- | modules/filter/filter.admin.inc | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/modules/block/block.module b/modules/block/block.module index 3e1e83cca..70dcc8e00 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -277,10 +277,10 @@ function block_get_blocks_by_region($region) { $build[$key] = $block->content; unset($block->content); $build[$key] += array( - '#theme_wrappers' => array('block'), '#block' => $block, '#weight' => ++$weight, ); + $build[$key]['#theme_wrappers'][] ='block'; } $build['#sorted'] = TRUE; } @@ -735,7 +735,9 @@ function _block_render_blocks($region_blocks) { } if (isset($block->content) && $block->content) { // Normalize to the drupal_render() structure. - $block->content = array('content' => is_string($block->content) ? array('#markup' => $block->content) : $block->content); + if (is_string($block->content)) { + $block->content = array('#markup' => $block->content); + } // Override default block title if a custom display title is present. if ($block->title) { // Check plain here to allow module generated titles to keep any diff --git a/modules/filter/filter.admin.inc b/modules/filter/filter.admin.inc index e4b71fce9..f92a6b938 100644 --- a/modules/filter/filter.admin.inc +++ b/modules/filter/filter.admin.inc @@ -66,7 +66,8 @@ function filter_admin_overview_submit($form, &$form_state) { */ function theme_filter_admin_overview($form) { $rows = array(); - foreach ($form as $id => $element) { + foreach (element_children($form) as $id) { + $element = $form[$id]; if (isset($element['roles']) && is_array($element['roles'])) { $element['weight']['#attributes']['class'] = 'text-format-order-weight'; $rows[] = array( |