From: <an...@us...> - 2006-06-20 18:34:03
|
Update of /cvsroot/tikiwiki/tiki/lib/logs In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv19532/lib/logs Modified Files: Tag: BRANCH-1-9 logslib.php Log Message: if HTTP_USER_AGENT empty, we log it Index: logslib.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/lib/logs/logslib.php,v retrieving revision 1.4.2.2 retrieving revision 1.4.2.3 diff -u -d -r1.4.2.2 -r1.4.2.3 --- logslib.php 14 Dec 2005 14:44:13 -0000 1.4.2.2 +++ logslib.php 20 Jun 2006 18:33:52 -0000 1.4.2.3 @@ -8,11 +8,11 @@ } class LogsLib extends TikiLib { - + function LogsLib($db) { $this->db = $db; } - + function add_log($type,$message,$who='',$ip='',$client='',$time='') { global $user; if (!$who) { @@ -26,7 +26,11 @@ $ip = $_SERVER['REMOTE_ADDR']; } if (!$client) { - $client = $_SERVER['HTTP_USER_AGENT']; + if (!$_SERVER['HTTP_USER_AGENT']) { + $client = 'NO USER AGENT'; + } else { + $client = $_SERVER['HTTP_USER_AGENT']; + } } if (!$time) { $time = date("U"); |