svn: /web/php-bugs/trunk/ include/functions.php sql/bugs.sql www/report.php

From: Date: Mon, 29 Aug 2011 23:10:20 +0000
Subject: svn: /web/php-bugs/trunk/ include/functions.php sql/bugs.sql www/report.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-12073@lists.php.net to get a copy of this message
tyrael Mon, 29 Aug 2011 23:10:20 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=315749 Log: add ip logging for bugreports and comments Changed paths: U web/php-bugs/trunk/include/functions.php U web/php-bugs/trunk/sql/bugs.sql U web/php-bugs/trunk/www/report.php Modified: web/php-bugs/trunk/include/functions.php =================================================================== --- web/php-bugs/trunk/include/functions.php 2011-08-29 21:59:27 UTC (rev 315748) +++ web/php-bugs/trunk/include/functions.php 2011-08-29 23:10:20 UTC (rev 315749) @@ -1540,10 +1540,10 @@ global $dbh; return $dbh->prepare(" - INSERT INTO bugdb_comments (bug, email, reporter_name, comment, comment_type, ts) - VALUES (?, ?, ?, ?, ?, NOW()) + INSERT INTO bugdb_comments (bug, email, reporter_name, comment, comment_type, ts, visitor_ip) + VALUES (?, ?, ?, ?, ?, NOW(), INET_ATON(?)) ")->execute(array( - $bug_id, $from, $from_name, $comment, $type, + $bug_id, $from, $from_name, $comment, $type, $_SERVER['REMOTE_ADDR'] )); } Modified: web/php-bugs/trunk/sql/bugs.sql =================================================================== --- web/php-bugs/trunk/sql/bugs.sql 2011-08-29 21:59:27 UTC (rev 315748) +++ web/php-bugs/trunk/sql/bugs.sql 2011-08-29 23:10:20 UTC (rev 315749) @@ -22,6 +22,7 @@ block_user_comment char(1) default 'N', cve_id varchar(15) default NULL, private char(1) default 'N', + visitor_ip int(8) UNSIGNED NOT NULL, PRIMARY KEY (id), KEY php_version (php_version(1)), KEY status (status), @@ -37,6 +38,7 @@ ts datetime NOT NULL default '0000-00-00 00:00:00', comment text NOT NULL, comment_type varchar(10) default 'comment', + visitor_ip int(8) UNSIGNED NOT NULL, PRIMARY KEY (id), KEY bug (bug,id,ts), FULLTEXT KEY comment (comment) Modified: web/php-bugs/trunk/www/report.php =================================================================== --- web/php-bugs/trunk/www/report.php 2011-08-29 21:59:27 UTC (rev 315748) +++ web/php-bugs/trunk/www/report.php 2011-08-29 23:10:20 UTC (rev 315749) @@ -186,8 +186,9 @@ reporter_name, status, ts1, - private - ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, "Open", NOW(), ?) + private, + visitor_ip + ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, "Open", NOW(), ?, INET_ATON(?)) ')->execute(array( $package_name, $_POST['in']['bug_type'], @@ -198,7 +199,8 @@ $_POST['in']['php_os'], bugs_get_hash($_POST['in']['passwd']), $_POST['in']['reporter_name'], - $_POST['in']['private'] + $_POST['in']['private'], + $_SERVER['REMOTE_ADDR'] ) ); if (PEAR::isError($res)) {

« previous php.webmaster (#12073) next »