You are here

function block_admin_display_submit in Drupal 4

Same name and namespace in other branches
  1. 5 modules/block/block.module \block_admin_display_submit()

Process main block administration form submission.

File

modules/block.module, line 274
Controls the boxes that are displayed around the main content.

Code

function block_admin_display_submit($form_id, $form_values) {
  foreach ($form_values as $block) {
    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'], $block['throttle'], $block['module'], $block['delta'], $block['theme']);
  }
  drupal_set_message(t('The block settings have been updated.'));
  cache_clear_all();
}