[geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.278,1.279

dhaun at geeklog.net dhaun at geeklog.net
Mon Feb 2 14:05:41 EST 2004


Update of /usr/cvs/geeklog/geeklog-1.3/public_html
In directory geeklog_prod:/tmp/cvs-serv21897

Modified Files:
	lib-common.php 
Log Message:
Changed COM_accessLog to log the IP and uid of the user.


Index: lib-common.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.278
retrieving revision 1.279
diff -C2 -d -r1.278 -r1.279
*** lib-common.php	1 Feb 2004 17:34:25 -0000	1.278
--- lib-common.php	2 Feb 2004 19:05:39 -0000	1.279
***************
*** 779,782 ****
--- 779,783 ----
          ));
  
+     $pagetitle = '';
      if( isset( $_CONF['pagetitle'] ))
      {
***************
*** 1491,1505 ****
  function COM_accessLog( $logentry )
  {
!     global $_CONF, $LANG01;
  
!     $timestamp = strftime( "%c" );
      $logfile = $_CONF['path_log'] . 'access.log';
  
      if( !$file = fopen( $logfile, 'a' ))
      {
!         $retval .= $LANG01[33] . $logfile . ' (' . $timestamp . ')<br>' . LB;
      }
  
!     fputs( $file, "$timestamp - $logentry \n" );
  
      return $retval;
--- 1492,1517 ----
  function COM_accessLog( $logentry )
  {
!     global $_CONF, $_USER, $LANG01, $REMOTE_ADDR;
  
!     $retval = '';
! 
!     $timestamp = strftime( '%c' );
      $logfile = $_CONF['path_log'] . 'access.log';
  
      if( !$file = fopen( $logfile, 'a' ))
      {
!         return $LANG01[33] . $logfile . ' (' . $timestamp . ')<br>' . LB;
      }
  
!     if( isset( $_USER['uid'] ))
!     {
!         $byuser = $_USER['uid'] . '@' . $REMOTE_ADDR;
!     }
!     else
!     {
!         $byuser = 'anon@' . $REMOTE_ADDR;
!     }
! 
!     fputs( $file, "$timestamp ($byuser) - $logentry\n" );
  
      return $retval;





More information about the geeklog-cvs mailing list