Archived
1
0

Deny duplicate pingbacks and send message about new pingbacks found in

blog.
This commit is contained in:
Grischa Brockhaus
2012-01-17 12:55:09 +01:00
parent 4822b3e7b8
commit f2c6b669ad
2 changed files with 10 additions and 3 deletions
+7
View File
@@ -400,6 +400,13 @@ function add_pingback ($id, $postdata) {
}
if ($id>0) {
// first check, if we already have this pingback
$comments = serendipity_fetchComments($id,1,'co.id',true,'PINGBACK'," AND co.url='$remote'");
if (is_array($comments) && sizeof($comments) == 1) {
log_pingback("We already have that PINGBACK!");
return 0; // We already have it!
}
// We don't have it, so save the pingback
serendipity_saveComment($id, $comment, 'PINGBACK');
return 1;
} else {