You are here

function ldaphelp_addcommon in LDAP integration 6

1 string reference to 'ldaphelp_addcommon'
ldaphelp_menu in ldaphelp/ldaphelp.module
Implementation of hook_menu().

File

ldaphelp/ldaphelp.module, line 180
The ldaphelp module is a module to help admins debug ldap_integration modules.

Code

function ldaphelp_addcommon() {
  if (!module_exists('ldapauth')) {
    drupal_set_message(t('Links below will not work until ldapauth module is not enabled.'), 'warning');
  }
  global $_ldaphelp_ldaps;
  $content = '<h3>' . t('LDAP Integration Default LDAPs') . '</h3>';
  $content .= '<p>' . t('These links simply start an Add LDAP Server form with some common defaults.') . '</p>';
  $content .= '<ul>';
  foreach ($_ldaphelp_ldaps as $ldap_type => $default_data) {
    $content .= "<li>" . l($default_data['name'] . ' ' . t('Common Settings:'), 'admin/settings/ldap/ldapauth/add/' . $ldap_type) . "<br/><code>";
    $content .= ldaphelp_display_settings_short($_ldaphelp_ldaps[$ldap_type]['fields']);
    $content .= "</code></li>";
  }
  $content .= "</ul>";
  return $content;
}