function ldap_query_update_7100 in Lightweight Directory Access Protocol (LDAP) 7
Same name and namespace in other branches
- 8.2 ldap_query/ldap_query.install \ldap_query_update_7100()
- 7.2 ldap_query/ldap_query.install \ldap_query_update_7100()
Add scope field to ldap_query table.
File
- ldap_query/
ldap_query.install, line 71 - 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');
ldap_server_module_load_include('module', 'ldap_servers', 'ldap_servers');
// get LDAP_SCOPE_SUBTREE constant
// 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', array(
'type' => 'int',
'size' => 'tiny',
'not null' => FALSE,
'default' => LDAP_SCOPE_SUBTREE,
));
return t('"scope" field added to ldap_query table');
}
else {
return t('No database changes made.');
}
}