Deny duplicate pingbacks and send message about new pingbacks found in
blog.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user