function ldap_query_update_7100 in Lightweight Directory Access Protocol (LDAP) 7.2
Same name and namespace in other branches
- 8.2 ldap_query/ldap_query.install \ldap_query_update_7100()
- 7 ldap_query/ldap_query.install \ldap_query_update_7100()
Add scope field to ldap_query table.
File
- ldap_query/
ldap_query.install, line 69 - Install, update and uninstall functions for the LDAP API module.
Code
function ldap_query_update_7100() {
module_load_include('inc', 'ldap_servers', 'ldap_servers.functions');
// Get LDAP_SCOPE_SUBTREE constant.
ldap_servers_module_load_include('module', 'ldap_servers', 'ldap_servers');
// Make sure 'create_consumers' field is there for old 7.x-1.x-dev versions.
if (!db_field_exists('ldap_query', 'scope')) {
db_add_field('ldap_query', 'scope', [
'type' => 'int',
'size' => 'small',
'not null' => FALSE,
'default' => LDAP_SCOPE_SUBTREE,
]);
return t('"scope" field added to ldap_query table');
}
else {
return t('No database changes made.');
}
}