function block_box_save in Drupal 5
Same name and namespace in other branches
- 4 modules/block.module \block_box_save()
- 6 modules/block/block.module \block_box_save()
2 calls to block_box_save()
- block_block in modules/
block/ block.module - Implementation of hook_block().
- block_box_form_submit in modules/
block/ block.module
File
- modules/
block/ block.module, line 571 - Controls the boxes that are displayed around the main content.
Code
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;
}