You are here

function ldap_servers_update_7104 in Lightweight Directory Access Protocol (LDAP) 7

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

add pagination fields to ldap_servers table

File

ldap_servers/ldap_servers.install, line 207
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');
  }
  return $msg ? $msg : t('No database changes made.');
}