function block_box_save in Block Cache Alter 6
Same name in this branch
- 6 patches/block_with_node_grants.module \block_box_save()
- 6 patches/block_no_node_grants.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.
2 calls to block_box_save()
- block_block in patches/
block_with_node_grants.module - Implementation of hook_block().
- block_block in patches/
block_no_node_grants.module - Implementation of hook_block().
File
- patches/
block_with_node_grants.module, line 388 - 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;
}