Commit 2845fa95 authored by Dries's avatar Dries

- Patch #648710 by pwolanin, Gábor Hojtsy: fixed error when creating new block without region.

parent 0baad49d
......@@ -413,7 +413,7 @@ function block_admin_configure_submit($form, &$form_state) {
db_merge('block')
->key(array('theme' => $theme, 'delta' => $form_state['values']['delta'], 'module' => $form_state['values']['module']))
->fields(array(
'region' => $region,
'region' => ($region == BLOCK_REGION_NONE ? '' : $region),
'pages' => trim($form_state['values']['pages']),
'status' => (int) ($region != BLOCK_REGION_NONE),
))
......@@ -498,7 +498,7 @@ function block_add_block_form_submit($form, &$form_state) {
db_merge('block')
->key(array('theme' => $theme, 'delta' => $delta, 'module' => $form_state['values']['module']))
->fields(array(
'region' => $region,
'region' => ($region == BLOCK_REGION_NONE ? '' : $region),
'pages' => trim($form_state['values']['pages']),
'status' => (int) ($region != BLOCK_REGION_NONE),
))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment