block_box_save

Versions
4.6 – 5
block_box_save($edit, $delta = NULL)
6
block_box_save($edit, $delta)

Code

modules/block/block.module, line 571

<?php
function block_box_save($edit, $delta = NULL) {
  if (!filter_access($edit['format'])) {
    $edit['format'] = FILTER_FORMAT_DEFAULT;
  }

  if (isset($delta)) {
    db_query("UPDATE {boxes} SET body = '%s', info = '%s', format = %d WHERE bid = %d", $edit['body'], $edit['info'], $edit['format'], $delta);
  }
  else {
    db_query("INSERT INTO {boxes} (body, info, format) VALUES  ('%s', '%s', %d)", $edit['body'], $edit['info'], $edit['format']);
  }
  return TRUE;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.