You are here

function environment_indicator_machine_available in Environment Indicator 7.2

Helper function to check if the machine name is available.

1 string reference to 'environment_indicator_machine_available'
environment_indicator_ui_form in ./environment_indicator.module
System settings form.

File

./environment_indicator.module, line 268
Module implementation file.

Code

function environment_indicator_machine_available($machine) {
  return db_query("SELECT COUNT(*) FROM {environment_indicator_environment} WHERE machine = :machine", array(
    ':machine' => $machine,
  ))
    ->fetchField() > 0 && $machine != 'overwritten_environment';
}