You are here

function nodesinblock_queue_submit in Nodes In Block 7

Same name and namespace in other branches
  1. 6 nodesinblock.admin.inc \nodesinblock_queue_submit()

Submit callback, save weights after queue submit.

File

./nodesinblock.admin.inc, line 282
Administration page for nodes in block.

Code

function nodesinblock_queue_submit($form, &$form_state) {
  foreach ($form_state['values']['nodes'] as $node) {
    db_update('nodesinblock')
      ->condition('delta', $form_state['values']['delta'])
      ->condition('nid', $node['nid'])
      ->fields(array(
      'weight' => $node['weight'],
    ))
      ->execute();
  }
}