You are here

function ldaphelp_watchdog_list in LDAP integration 6

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

File

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

Code

function ldaphelp_watchdog_list() {

  /* watchdog table */
  drupal_add_css(drupal_get_path('module', 'ldaphelp') . '/ldaphelp.css', 'module', 'all', FALSE);
  $path = drupal_get_path("module", "ldapauth");
  $_content = "";
  if (module_exists('dblog')) {
    include_once drupal_get_path('module', 'dblog') . '/dblog.admin.inc';
    $_SESSION['dblog_overview_filter']['type'] = array(
      'ldapauth' => 'ldapauth',
    );
    if (!($_SESSION['dblog_overview_filter'] || $_SESSION['dblog_overview_filter']['severity'])) {
      $_SESSION['dblog_overview_filter']['severity'] = array();
    }
    $_content .= "<h3>" . t('LDAP Watchdog Errors and Notifications') . "</h3>";
    $_content .= dblog_overview();
    $_content .= l('...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('Module enable page', 'admin/build/modules');
  }
  return $_content;
}