You are here

function ldap_servers_update_7104 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_7104()
  2. 7 ldap_servers/ldap_servers.install \ldap_servers_update_7104()

add pagination fields to ldap_servers table

File

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

Code

function ldap_servers_update_7104() {
  if (!db_field_exists('ldap_servers', 'search_pagination')) {
    db_add_field('ldap_servers', 'search_pagination', array(
      'type' => 'int',
      'size' => 'tiny',
      'not null' => FALSE,
      'default' => 0,
    ));
    $msg = t('"search_pagination" field added to ldap_servers table');
  }
  if (!db_field_exists('ldap_servers', 'search_page_size')) {
    db_add_field('ldap_servers', 'search_page_size', array(
      'type' => 'int',
      'size' => 'medium',
      'not null' => FALSE,
      'default' => 1000,
    ));
    $msg .= '<br/>' . t('"search_page_size" field added to ldap_servers table');
  }
  if (!db_field_exists('ldap_servers', 'unique_persistent_attr_binary')) {
    db_add_field('ldap_servers', 'unique_persistent_attr_binary', array(
      'type' => 'int',
      'size' => 'tiny',
      'not null' => FALSE,
      'default' => 0,
    ));
    $msg = t('"unique_persistent_attr_binary" field added to ldap_servers table');
  }
  return $msg ? $msg : t('No database changes made.');
}