You are here

function disable_breadcrumbs_insert in Disable breadcrumbs 7

Insert a record into disable_breadcrumbs table.

1 call to disable_breadcrumbs_insert()
disable_breadcrumbs_node_form_submit in ./disable_breadcrumbs.module
Submit handler to deal with

File

./disable_breadcrumbs.module, line 329
Disable breadcrumbs

Code

function disable_breadcrumbs_insert($nodes) {
  if (!is_array($nodes)) {
    $nodes = array(
      $nodes,
    );
  }
  $query = db_insert('disable_breadcrumbs')
    ->fields(array(
    'disable_breadcrumb',
    'nid',
  ));
  foreach ($nodes as $nid) {
    $query
      ->values(array(
      'disable_breadcrumb' => 1,
      // For now this will always be 1.
      'nid' => $nid,
    ));
  }
  return $query
    ->execute();
}