diff options
author | Evan Prodromou <evan@status.net> | 2009-12-08 14:43:21 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-12-08 14:43:21 -0500 |
commit | 78fc9483d4d1fde4561905edf6594b86c4dc374e (patch) | |
tree | 7172cabba4c36bb3a7bd00a78ab09f1791a9a60c /lib/util.php | |
parent | 75b11527c7efb1d3d9c7d53b99d80480ce06a9f5 (diff) | |
parent | 3536f01258dc43bee764c98fbdda5a6f1df7bcb2 (diff) |
Merge branch '0.9.x' into testing
Diffstat (limited to 'lib/util.php')
-rw-r--r-- | lib/util.php | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/lib/util.php b/lib/util.php index 99a0a1db3..14d666503 100644 --- a/lib/util.php +++ b/lib/util.php @@ -127,7 +127,7 @@ function common_check_user($nickname, $password) if (0 == strcmp(common_munge_password($password, $user->id), $user->password)) { //internal checking passed - $authenticatedUser =& $user; + $authenticatedUser = $user; } } } @@ -1070,18 +1070,21 @@ function common_request_id() function common_log($priority, $msg, $filename=null) { - $msg = '[' . common_request_id() . '] ' . $msg; - $logfile = common_config('site', 'logfile'); - if ($logfile) { - $log = fopen($logfile, "a"); - if ($log) { - $output = common_log_line($priority, $msg); - fwrite($log, $output); - fclose($log); + if(Event::handle('StartLog', array(&$priority, &$msg, &$filename))){ + $msg = '[' . common_request_id() . '] ' . $msg; + $logfile = common_config('site', 'logfile'); + if ($logfile) { + $log = fopen($logfile, "a"); + if ($log) { + $output = common_log_line($priority, $msg); + fwrite($log, $output); + fclose($log); + } + } else { + common_ensure_syslog(); + syslog($priority, $msg); } - } else { - common_ensure_syslog(); - syslog($priority, $msg); + Event::handle('EndLog', array($priority, $msg, $filename)); } } |