You are here

function ldap_servers_update_7109 in Lightweight Directory Access Protocol (LDAP) 8.2

Same name and namespace in other branches
  1. 7.2 ldap_servers/ldap_servers.install \ldap_servers_update_7109()

adjust group related fields to ldap_servers table

File

ldap_servers/ldap_servers.install, line 322
Install, update and uninstall functions for the LDAP API module.

Code

function ldap_servers_update_7109() {
  if (!db_field_exists('ldap_servers', 'groupNested')) {
    db_add_field('ldap_servers', 'groupNested', array(
      'type' => 'int',
      'size' => 'tiny',
      'not null' => FALSE,
      'default' => 0,
    ));
    $msg = t('"groupNested" field added to ldap_servers table');
  }
  if (!db_field_exists('ldap_servers', 'groupUseFirstAttr')) {
    db_add_field('ldap_servers', 'groupUseFirstAttr', array(
      'type' => 'int',
      'size' => 'tiny',
      'not null' => FALSE,
      'default' => 0,
    ));
    $msg .= '<br/>' . t('"groupUseFirstAttr" field added to ldap_servers table');
  }
  if (!db_field_exists('ldap_servers', 'groupSearchAll')) {
    db_add_field('ldap_servers', 'groupSearchAll', array(
      'type' => 'int',
      'size' => 'tiny',
      'not null' => FALSE,
      'default' => 0,
    ));
    $msg = t('"groupSearchAll" field added to ldap_servers table');
  }
  if (!db_field_exists('ldap_servers', 'groupUserMembershipsAttrExists')) {
    db_add_field('ldap_servers', 'groupUserMembershipsAttrExists', array(
      'type' => 'int',
      'size' => 'tiny',
      'not null' => FALSE,
      'default' => 0,
    ));
    $msg = t('"groupUserMembershipsAttrExists" field added to ldap_servers table');
  }
  if (!db_field_exists('ldap_servers', 'groupUserMembershipsAttr')) {
    db_add_field('ldap_servers', 'groupUserMembershipsAttr', array(
      'type' => 'varchar',
      'length' => '255',
      'not null' => FALSE,
    ));
    $msg = t('"groupUserMembershipsAttr" field added to ldap_servers table');
  }
  if (!db_field_exists('ldap_servers', 'groupMembershipsAttr')) {
    db_add_field('ldap_servers', 'groupMembershipsAttr', array(
      'type' => 'varchar',
      'length' => '255',
      'not null' => FALSE,
    ));
    $msg = t('"groupMembershipsAttr" field added to ldap_servers table');
  }
  if (!db_field_exists('ldap_servers', 'groupMembershipsAttrMatchingUserAttr')) {
    db_add_field('ldap_servers', 'groupMembershipsAttrMatchingUserAttr', array(
      'type' => 'varchar',
      'length' => '255',
      'not null' => FALSE,
    ));
    $msg = t('"groupMembershipsAttrMatchingUserAttr" field added to ldap_servers table');
  }
  if (!db_field_exists('ldap_servers', 'groupUserMembershipsAttrExists')) {
    db_add_field('ldap_servers', 'groupUserMembershipsAttrExists', array(
      'type' => 'int',
      'size' => 'tiny',
      'not null' => FALSE,
      'default' => 0,
    ));
    $msg = t('"groupUserMembershipsAttrExists" field added to ldap_servers table');
  }
  if (!db_field_exists('ldap_servers', 'groupUserMembershipsAttr')) {
    db_add_field('ldap_servers', 'groupUserMembershipsAttr', array(
      'type' => 'varchar',
      'length' => '255',
      'not null' => FALSE,
    ));
    $msg = t('"groupUserMembershipsAttr" field added to ldap_servers table');
  }
}