You are here

function bat_type_get_current_type_revision_id in Booking and Availability Management Tools for Drupal 7

Get the id of the current revision that the supplied type is pointing to.

Used in cases where the type object wasn't fully loaded or was loaded with a different revision.

Parameters

int $type_id: The id of the type whose current revision id is to be returned.

Return value

int A single number being the current revision id (revision_id).

1 call to bat_type_get_current_type_revision_id()
bat_type_revisioning_rules_action_publish_latest in modules/bat_unit/bat_unit.rules.inc
Action: publish most recent pending revision.

File

modules/bat_unit/bat_unit.module, line 1528

Code

function bat_type_get_current_type_revision_id($type_id) {
  $result = db_query("SELECT revision_id FROM {bat_types} WHERE type_id = :type_id", array(
    ':type_id' => $type_id,
  ));
  return $result
    ->fetchField();
}