You are here

function block_inject_update_region in Block Inject 7

Updates a region in the database.

Parameters

int $id: Id of the region to be updated.

string $new_region: The new region name.

string $new_node_type: The new machine readable node type name it applies for.

string $new_node_type_name: The new human readable node type name it applies for.

1 call to block_inject_update_region()
block_inject_edit_form_submit in ./block_inject.admin.inc
Submit form to edit a region.

File

./block_inject.module, line 472
The Block Inject module functions.

Code

function block_inject_update_region($id, $new_region, $new_node_type, $new_node_type_name, $condition = NULL) {
  $db_edit = db_update('block_inject')
    ->fields(array(
    'region' => $new_region,
    'node_type' => $new_node_type,
    'node_name' => $new_node_type_name,
    'bi_condition' => $condition,
  ))
    ->condition('id', $id)
    ->execute();
}