cvs: php-master-web /entry user-note.php
| From: | Nuno Lopes | Date: | Mon, 16 Jan 2006 12:44:44 +0000 |
| Subject: | cvs: php-master-web /entry user-note.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-30374@lists.php.net to get a copy of this message | ||
nlopess Mon Jan 16 12:44:44 2006 UTC
Modified files:
/php-master-web/entry user-note.php
Log:
readd the code to show the note submiter IP (now E_NOTICE free), so that we can ban the current
spammer (I'm getting tired of it)
http://cvs.php.net/viewcvs.cgi/php-master-web/entry/user-note.php?r1=1.33&r2=1.34&diff_format=u
Index: php-master-web/entry/user-note.php
diff -u php-master-web/entry/user-note.php:1.33 php-master-web/entry/user-note.php:1.34
--- php-master-web/entry/user-note.php:1.33 Thu Sep 15 14:30:30 2005
+++ php-master-web/entry/user-note.php Mon Jan 16 12:44:44 2006
@@ -64,20 +64,20 @@
if (@mysql_query($query)) {
$new_id = mysql_insert_id();
$msg = stripslashes($note);
- /*
+
$msg .= "\n----\n";
$msg .= "Submitter IP: {$_SERVER['REMOTE_ADDR']}";
- if ($xFwd = isset($_SERVER['HTTP_X_FORWARDED_FOR']) || $xVia =
isset($_SERVER['HTTP_VIA'])) {
+ if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) || isset($_SERVER['HTTP_VIA'])) {
$msg .= " (proxied:";
- if ($xFwd) {
+ if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$msg .= " " . htmlspecialchars($_SERVER['HTTP_X_FORWARDED_FOR']);
}
- if ($xVia) {
+ if (isset($_SERVER['HTTP_VIA'])) {
$msg .= " " . htmlspecialchars($_SERVER['HTTP_VIA']);
}
$msg .= ")";
}
- */
+
$msg .= "\n----\n";
$msg .= "Manual Page -- http://www.php.net/manual/en/$sect.php\n";
$msg .= "Edit -- http://master.php.net/manage/user-notes.php?action=edit+$new_id\n";