diff --git a/lam/lib/security.inc b/lam/lib/security.inc index 0aff6d63..5e745d5e 100644 --- a/lam/lib/security.inc +++ b/lam/lib/security.inc @@ -208,6 +208,17 @@ function logoffAndBackToLoginPage() { die(); } +/** + * Returns if debug messages are to be logged. + * + * @return boolean debug enabled + */ +function isDebugLoggingEnabled() { + if (isset($_SESSION['cfgMain'])) $cfg = $_SESSION['cfgMain']; + else $cfg = new LAMCfgMain(); + return $cfg->logLevel >= LOG_DEBUG; +} + /** * Puts a new message in the log file. *