Same name and namespace in other branches
- 4.6.x modules/block.module \block_box_save()
- 4.7.x modules/block.module \block_box_save()
- 5.x 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.
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;
}