Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5526
Modified Files:
NEWS serendipity_functions.inc.php
Log Message:
We have an 'ip' field in our database, but we don't use it for anything - that's a real shame
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.308
retrieving revision 1.309
diff -u -d -r1.308 -r1.309
--- serendipity_functions.inc.php 2 Jul 2004 12:47:46 -0000 1.308
+++ serendipity_functions.inc.php 3 Jul 2004 16:33:10 -0000 1.309
@@ -1535,6 +1535,7 @@
if (serendipity_db_bool($ca['allow_comments']) || !is_array($ca)) {
$title = serendipity_db_escape_string(isset($commentInfo['title']) ? $commentInfo['title'] : '');
$comments = $commentInfo['comment'];
+ $ip = $_SERVER['REMOTE_ADDR'];
$commentsFixed = serendipity_db_escape_string($commentInfo['comment']);
$name = serendipity_db_escape_string($commentInfo['name']);
$url = serendipity_db_escape_string($commentInfo['url']);
@@ -1548,8 +1549,8 @@
}
$t = time();
- $query = "INSERT INTO {$serendipity['dbPrefix']}comments (entry_id, parent_id, author, email, url, body, type, timestamp, title, subscribed)";
- $query .= " VALUES ('$id', '$parentid', '$name', '$email', '$url', '$commentsFixed', '$type', '$t', '$title', '$subscribe')";
+ $query = "INSERT INTO {$serendipity['dbPrefix']}comments (entry_id, parent_id, ip, author, email, url, body, type, timestamp, title, subscribed)";
+ $query .= " VALUES ('$id', '$parentid', '$ip', '$name', '$email', '$url', '$commentsFixed', '$type', '$t', '$title', '$subscribe')";
serendipity_db_query($query);
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -d -r1.164 -r1.165
--- NEWS 2 Jul 2004 12:47:46 -0000 1.164
+++ NEWS 3 Jul 2004 16:33:10 -0000 1.165
@@ -3,6 +3,9 @@
Version 0.7 ()
------------------------------------------------------------------------
+ * Actually log the IP of users whom submit comments and blogs which
+ trackback (tomsommer)
+
* Plugin hook 'backend_publish' now executed on entries saved as
draft first and after that as a public. Fixes weblogpings not sent
to those entries. (garvinhicking)
|