You are here

function block_box_save in Drupal 6

Same name and namespace in other branches
  1. 4 modules/block.module \block_box_save()
  2. 5 modules/block/block.module \block_box_save()

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 modules/block/block.module
Implementation of hook_block().

File

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;
}