You are here

function nodeblock_block_save in Nodeblock 7

Implements hook_block_save().

File

./nodeblock.module, line 898
Enables use of specified node types as custom blocks.

Code

function nodeblock_block_save($delta = '', $edit = array()) {
  $fields = array(
    'view_mode' => $edit['view_mode'],
    'node_link' => $edit['node_link'],
  );
  if (isset($edit['comment_link'])) {
    $fields['comment_link'] = $edit['comment_link'];
  }
  db_update('nodeblock')
    ->condition('machine_name', $delta)
    ->fields($fields)
    ->execute();
}