You are here

function ldap_api_deactivate_server in Lightweight Directory Access Protocol (LDAP) 6

Page callback created in the implementation of hook_menu.

See also

ctools_modal_form_wrapper()

1 string reference to 'ldap_api_deactivate_server'
ldap_api_menu in ./ldap_api.module
Implementation of hook_menu().

File

./ldap_server.admin.inc, line 358

Code

function ldap_api_deactivate_server($sid) {
  if (is_numeric($sid) && db_query("SELECT sid from {ldap_servers} WHERE sid = %d", $sid)) {
    ctools_include('ajax');
    ctools_include('modal');
    $form_state = array(
      'ajax' => TRUE,
      'sid' => $sid,
    );
    $output = ctools_modal_form_wrapper('ldap_api_deactivate_server_form', $form_state);
    if (!$output) {
      $output = array();
      $output[] = ctools_ajax_command_reload();
      $output[] = ctools_modal_command_dismiss();
    }
    ctools_ajax_render($output);
  }
}