function block_admin_display_form_submit in Drupal 6
Same name and namespace in other branches
- 7 modules/block/block.admin.inc \block_admin_display_form_submit()
Process main blocks administration form submission.
File
- modules/
block/ block.admin.inc, line 99 - Admin page callbacks for the block module.
Code
function block_admin_display_form_submit($form, &$form_state) {
foreach ($form_state['values'] as $block) {
$block['status'] = $block['region'] != BLOCK_REGION_NONE;
$block['region'] = $block['status'] ? $block['region'] : '';
db_query("UPDATE {blocks} SET status = %d, weight = %d, region = '%s', throttle = %d WHERE module = '%s' AND delta = '%s' AND theme = '%s'", $block['status'], $block['weight'], $block['region'], isset($block['throttle']) ? $block['throttle'] : 0, $block['module'], $block['delta'], $block['theme']);
}
drupal_set_message(t('The block settings have been updated.'));
cache_clear_all();
}