[geeklog-cvs] geeklog-1.3/public_html comment.php,1.58,1.59 lib-common.php,1.318,1.319

dhaun at iowaoutdoors.org dhaun at iowaoutdoors.org
Sun May 9 05:54:05 EDT 2004


Update of /var/cvs/geeklog-1.3/public_html
In directory www:/tmp/cvs-serv13147/public_html

Modified Files:
	comment.php lib-common.php 
Log Message:
Added tracking of IP addresses of comment posters (suggested by Michael Jervis).


Index: comment.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/comment.php,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -d -r1.58 -r1.59
*** comment.php	20 Apr 2004 02:23:19 -0000	1.58
--- comment.php	9 May 2004 09:54:03 -0000	1.59
***************
*** 239,243 ****
  function savecomment ($uid, $title, $comment, $sid, $pid, $type, $postmode) 
  {
!     global $_CONF, $_TABLES, $_USER, $LANG03;
  
      $retval = '';
--- 239,243 ----
  function savecomment ($uid, $title, $comment, $sid, $pid, $type, $postmode) 
  {
!     global $_CONF, $_TABLES, $_USER, $LANG03, $REMOTE_ADDR;
  
      $retval = '';
***************
*** 306,315 ****
              DB_query("UPDATE {$_TABLES['comments']} SET rht = rht + 2 "
                     . "WHERE sid = '$sid' AND rht >= $rht");
!             DB_save ($_TABLES['comments'], 'sid,uid,comment,date,title,pid,lft,rht,indent,type',
!                     "'$sid',$uid,'$comment',now(),'$title',$pid,$rht,$rht+1,$indent+1,'$type'");            
          } else {
              $rht = DB_getItem($_TABLES['comments'], 'MAX(rht)');
!             DB_save ($_TABLES['comments'], 'sid,uid,comment,date,title,pid,lft,rht,indent,type',
!                     "'$sid',$uid,'$comment',now(),'$title',$pid,$rht+1,$rht+2,0,'$type'");               
          }
          DB_query('UNLOCK TABLES');
--- 306,315 ----
              DB_query("UPDATE {$_TABLES['comments']} SET rht = rht + 2 "
                     . "WHERE sid = '$sid' AND rht >= $rht");
!             DB_save ($_TABLES['comments'], 'sid,uid,comment,date,title,pid,lft,rht,indent,type,ipaddress',
!                     "'$sid',$uid,'$comment',now(),'$title',$pid,$rht,$rht+1,$indent+1,'$type','$REMOTE_ADDR'");
          } else {
              $rht = DB_getItem($_TABLES['comments'], 'MAX(rht)');
!             DB_save ($_TABLES['comments'], 'sid,uid,comment,date,title,pid,lft,rht,indent,type,ipaddress',
!                     "'$sid',$uid,'$comment',now(),'$title',$pid,$rht+1,$rht+2,0,'$type','$REMOTE_ADDR'");
          }
          DB_query('UNLOCK TABLES');

Index: lib-common.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.318
retrieving revision 1.319
diff -C2 -d -r1.318 -r1.319
*** lib-common.php	1 May 2004 17:57:04 -0000	1.318
--- lib-common.php	9 May 2004 09:54:03 -0000	1.319
***************
*** 2813,2820 ****
          if( $delete_option )
          {
!             $template->set_var( 'delete_option', '| <a href="' . $_CONF['site_url']
!                     . '/comment.php?mode=' . $LANG01[28] . '&cid=' . $A['cid']
!                     . '&sid=' . $A['sid'] . '&type=' . $type . '">'
!                     . $LANG01[28] . '</a> ' );
          }
          else
--- 2813,2825 ----
          if( $delete_option )
          {
!             $deloption = '| <a href="' . $_CONF['site_url']
!                        . '/comment.php?mode=' . $LANG01[28] . '&cid='
!                        . $A['cid'] . '&sid=' . $A['sid'] . '&type='
!                        . $type . '">' . $LANG01[28] . '</a> ';
!             if( !empty( $A['ipaddress'] ))
!             {
!                 $deloption .= '| ' . $A['ipaddress'] . ' ';
!             }
!             $template->set_var( 'delete_option', $deloption );
          }
          else




More information about the geeklog-cvs mailing list