function ldapauth_admin_list_submit in LDAP integration 6
Submit hook for the servers list form.
File
- ./
ldapauth.admin.inc, line 204 - Module admin page callbacks.
Code
function ldapauth_admin_list_submit($form, &$form_state) {
$op = $form_state['clicked_button']['#value'];
switch ($op) {
case t('Save'):
foreach ($form_state['clicked_button']['#post'] as $name => $val) {
if (preg_match('/^sid_.*_weight/', $name)) {
$sid = preg_replace(array(
'/^sid_/',
'/_weight$/',
), array(
'',
'',
), $name);
db_query("UPDATE {ldapauth} SET weight = %d WHERE sid = %d", $val, $sid);
}
}
break;
}
}