function block_box_save

6.x block.module block_box_save($edit, $delta)

Saves a user-created block in the database.

Parameters

$edit: Associative array of fields to save. Array keys:

  • info: Block description.
  • body: Block contents.
  • format: Filter ID of the filter format for the body.

$delta: Block ID of the block to save.

Return value

Always returns TRUE.

1 call to block_box_save()
block_block in drupal-6.x/modules/block/block.module
Implementation of hook_block().

File

drupal-6.x/modules/block/block.module, line 392
Controls the boxes that are displayed around the main content.

Code

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

  db_query("UPDATE {boxes} SET body = '%s', info = '%s', format = %d WHERE bid = %d", $edit['body'], $edit['info'], $edit['format'], $delta);

  return TRUE;
}