]> git.pld-linux.org Git - packages/drupal.git/blame - drupal-http-reject.patch
- drop old triggers
[packages/drupal.git] / drupal-http-reject.patch
CommitLineData
bb201270
ER
1--- drupal/modules/comment.module~ 2007-09-12 11:15:08.000000000 +0300
2+++ drupal/modules/comment.module 2007-09-12 11:15:01.000000000 +0300
3@@ -650,8 +650,11 @@
4 $edit['name'] = $user->name;
5 }
6
7-
8- db_query("INSERT INTO {comments} (cid, nid, pid, uid, subject, comment, format, hostname, timestamp, status, score, users, thread, name, mail, homepage) VALUES (%d, %d, %d, %d, '%s', '%s', %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s')", $edit['cid'], $edit['nid'], $edit['pid'], $edit['uid'], $edit['subject'], $edit['comment'], $edit['format'], $_SERVER['REMOTE_ADDR'], $edit['timestamp'], $status, $score, $users, $thread, $edit['name'], $edit['mail'], $edit['homepage']);
9+ if ($edit['name'] == '' && strpos($edit['comment'], 'http://') !== false) {
10+ error_log("comments Got spammer: cid=$edit[cid] nid=$edit[nid] pid=$edit[pid] uid=$edit[uid] subject=$edit[subject] comment=$edit[comment]");
11+ } else {
12+ db_query("INSERT INTO {comments} (cid, nid, pid, uid, subject, comment, format, hostname, timestamp, status, score, users, thread, name, mail, homepage) VALUES (%d, %d, %d, %d, '%s', '%s', %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s')", $edit['cid'], $edit['nid'], $edit['pid'], $edit['uid'], $edit['subject'], $edit['comment'], $edit['format'], $_SERVER['REMOTE_ADDR'], $edit['timestamp'], $status, $score, $users, $thread, $edit['name'], $edit['mail'], $edit['homepage']);
13+ }
14
15 _comment_update_node_statistics($edit['nid']);
16
This page took 0.055755 seconds and 4 git commands to generate.