You are here

function ldap_authorization_help_watchdog in Lightweight Directory Access Protocol (LDAP) 8.2

Same name and namespace in other branches
  1. 7.2 ldap_authorization/ldap_authorization.inc \ldap_authorization_help_watchdog()
  2. 7 ldap_authorization/ldap_authorization.inc \ldap_authorization_help_watchdog()

@file bulk of authorization code executed to determine a users authorizations

File

ldap_authorization/ldap_authorization.inc, line 8
bulk of authorization code executed to determine a users authorizations

Code

function ldap_authorization_help_watchdog() {

  // remove after testing
  $path = drupal_get_path("module", "ldap_help");
  $_content = "";
  if (module_exists('dblog')) {
    include_once drupal_get_path('module', 'dblog') . '/dblog.admin.inc';
    $_SESSION['dblog_overview_filter']['type'] = array(
      'ldap' => 'ldap',
    );
    $_content .= "<h3>" . t('LDAP Watchdog Errors and Notifications') . "</h3>";
    $overview = dblog_overview();
    $_content .= render($overview);
    $_content .= l(t('...more watchdog'), 'admin/reports/dblog');
  }
  else {
    $_content .= "<h3>" . t('LDAP Help Watchdog Errors and Notifications') . "</h3>";
    $_content .= 'This feature requires <code>Database logging</code> module to be turned on. ';
    $_content .= l(t('Module enable page'), 'admin/build/modules');
  }
  return $_content;
}