diff --git a/lib/functions/logger.class.php b/lib/functions/logger.class.php index 752b4f0bb7..6bf4337111 100644 --- a/lib/functions/logger.class.php +++ b/lib/functions/logger.class.php @@ -84,6 +84,10 @@ class tlLogger extends tlObject protected $eventManager; protected $loggerTypeClass = array('db' => null, 'file' => null, 'mail' => null); protected $loggerTypeDomain; + + protected $logLevelFilter; + protected $db; + public function __construct(&$db) { @@ -124,9 +128,8 @@ public function getEventsFor($logLevels = null,$objectIDs = null,$objectTypes = $activityCodes = null,$limit = -1,$startTime = null, $endTime = null, $users = null) { - return $this->eventManager->getEventsFor($logLevels, - $objectIDs,$objectTypes,$activityCodes, - $limit,$startTime,$endTime,$users); + return $this->eventManager->getEventsFor($logLevels,$objectIDs,$objectTypes,$activityCodes, + $limit,$startTime,$endTime,$users); } public function deleteEventsFor($logLevels = null,$startTime = null) @@ -1206,12 +1209,8 @@ static public function getLogFileName() { global $tlCfg; $uID = isset($_SESSION['userID']) ? $_SESSION['userID'] : 0; - $lp = $tlCfg->log_path; - if ($uID > 0) { - return $lp . 'userlog' . $uID . ".log"; - } - return $lp . 'testlinklog.log'; + return $tlCfg->log_path . 'userlog' . $uID . ".log"; } /** @@ -1423,14 +1422,14 @@ function watchPHPErrors($errno, $errstr, $errfile, $errline) if ($doIt && isset($errors[$errno]) ) { // suppress some kind of errors - // strftime(),strtotime(),date() + // @strftime(),strtotime(),date() // work in block just to make copy and paste easier // Block 1 - errstr // Block 2 - errfile // if( ($errno == E_NOTICE && strpos($errstr,"unserialize()") !== false) || ($errno == E_NOTICE && strpos($errstr,"ob_end_clean()") !== false) || - ($errno == E_STRICT && strpos($errstr,"strftime()") !== false) || + ($errno == E_STRICT && strpos($errstr,"@strftime()") !== false) || ($errno == E_STRICT && strpos($errstr,"mktime()") !== false) || ($errno == E_STRICT && strpos($errstr,"date()") !== false) || ($errno == E_STRICT && strpos($errstr,"strtotime()") !== false) || diff --git a/lib/functions/string_api.php b/lib/functions/string_api.php index 0ce8cea36f..44f4720e88 100644 --- a/lib/functions/string_api.php +++ b/lib/functions/string_api.php @@ -288,15 +288,15 @@ function string_insert_hrefs( $p_string ) { # valid set of characters that may occur in url scheme. Note: - should be first (A-F != -AF). $t_url_valid_chars = '-_.,!~*\';\/?%^\\\\:@&={\|}+$#[:alnum:]\pL'; - $t_url_chars = "(?:${t_url_hex}|[${t_url_valid_chars}\(\)\[\]])"; - $t_url_chars2 = "(?:${t_url_hex}|[${t_url_valid_chars}])"; - $t_url_chars_in_brackets = "(?:${t_url_hex}|[${t_url_valid_chars}\(\)])"; - $t_url_chars_in_parens = "(?:${t_url_hex}|[${t_url_valid_chars}\[\]])"; + $t_url_chars = "(?:{$t_url_hex}|[{$t_url_valid_chars}\(\)\[\]])"; + $t_url_chars2 = "(?:{$t_url_hex}|[{$t_url_valid_chars}])"; + $t_url_chars_in_brackets = "(?:{$t_url_hex}|[{$t_url_valid_chars}\(\)])"; + $t_url_chars_in_parens = "(?:{$t_url_hex}|[{$t_url_valid_chars}\[\]])"; - $t_url_part1 = "${t_url_chars}"; - $t_url_part2 = "(?:\(${t_url_chars_in_parens}*\)|\[${t_url_chars_in_brackets}*\]|${t_url_chars2})"; + $t_url_part1 = "{$t_url_chars}"; + $t_url_part2 = "(?:\({$t_url_chars_in_parens}*\)|\[{$t_url_chars_in_brackets}*\]|{$t_url_chars2})"; - $s_url_regex = "/(${t_url_protocol}(${t_url_part1}*?${t_url_part2}+))/su"; + $s_url_regex = "/({$t_url_protocol}({$t_url_part1}*?{$t_url_part2}+))/su"; # e-mail regex $s_email_regex = substr_replace( email_regex_simple(), '(?:mailto:)?', 1, 0 ); @@ -306,7 +306,7 @@ function string_insert_hrefs( $p_string ) { /* $t_function = create_function( '$p_match', ' $t_url_href = \'href="\' . rtrim( $p_match[1], \'.\' ) . \'"\'; - return "${p_match[1]} [^]"; + return "{$p_match[1]} [^]"; ' ); $p_string = preg_replace_callback( $s_url_regex, $t_function, $p_string ); if( $t_change_quotes ) { @@ -324,7 +324,7 @@ function ( $p_match ) { } else { $t_url_target = ''; } - return "${p_match[1]}"; + return "{$p_match[1]}"; }, $p_string ); @@ -535,9 +535,9 @@ function email_regex_simple() { # a domain is one or more subdomains $t_subdomain = "(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)"; - $t_domain = "(${t_subdomain}(?:\.${t_subdomain})*)"; + $t_domain = "({$t_subdomain}(?:\.{$t_subdomain})*)"; - $s_email_regex = "/${t_recipient}\@${t_domain}/i"; + $s_email_regex = "/{$t_recipient}\@{$t_domain}/i"; } return $s_email_regex; }