You are here

function fe_paths_check_machine_name in File Entity Paths 7.2

Check, if machine name of settings is exists.

Parameters

$machine_name: The machine name to check

Return value

mixed The number of rows, in which the machine name is being. Normally it could be 0 or 1.

1 string reference to 'fe_paths_check_machine_name'
fe_paths_entity_edit_form in ./fe_paths.admin.inc
Form builder for File Entity Paths configuration add/edit form.

File

./fe_paths.module, line 811
Contains functions for the File Entity Paths module.

Code

function fe_paths_check_machine_name($machine_name) {
  return db_select('fe_paths_config', 'fe')
    ->fields('fe', array(
    'machine_name',
  ))
    ->condition('machine_name', $machine_name)
    ->execute()
    ->rowCount();
}