You are here

function _tac_fields_controlled_fields in Taxonomy Access Control 6

Get a list of all fields controlled by TAC Fields.

Return value

An array of field machine names.

6 calls to _tac_fields_controlled_fields()
tac_fields_add_form in tac_fields/tac_fields.admin.inc
Form to choose a field to control with TAC.
tac_fields_add_form_submit in tac_fields/tac_fields.admin.inc
Submit handler for tac_fields_add_form().
tac_fields_admin in tac_fields/tac_fields.admin.inc
Menu callback for TAC Fields admin page (admin/user/tac_fields).
tac_fields_delete in tac_fields/tac_fields.admin.inc
tac_fields_field_access in tac_fields/tac_fields.module
Implements hook_field_access().

... See full list

File

tac_fields/tac_fields.module, line 227
Allows administrators to control access to individual CCK fields based on the node's taxonomy categories.

Code

function _tac_fields_controlled_fields() {
  static $fields;
  if (!isset($fields)) {
    $fields = array();

    // If we are controlling the field, a global default will be set for anon.
    $r = db_query('SELECT field FROM {term_field_access_defaults} WHERE vid=0 AND rid=1');
    while ($row = db_fetch_object($r)) {
      $fields[] = $row->field;
    }
  }
  return $fields;
}