Make WordPress Core

Changeset 2983


Ignore:
Timestamp:
11/05/2005 04:20:09 PM (19 years ago)
Author:
ryan
Message:

Don't self ping. Props Mark Jaquith fixes #993

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment-functions.php

    r2942 r2983  
    591591
    592592    foreach($post_links_temp[0] as $link_test) :
    593         if ( !in_array($link_test, $pung) ) : // If we haven't pung it already
     593        if ( !in_array($link_test, $pung) && url_to_postid($link_test) != $post_ID) : // If we haven't pung it already and it isn't a link to itself
    594594            $test = parse_url($link_test);
    595595            if (isset($test['query']))
  • trunk/xmlrpc.php

    r2957 r2983  
    11801180            return new IXR_Error(33, 'The specified target URI cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');
    11811181
     1182        if ( $post_ID == url_to_postid($pagelinkedfrom) )
     1183            return new IXR_Error(0, 'The source URI and the target URI cannot both point to the same resource.');
     1184
    11821185        // Check if pings are on
    11831186        if ( 'closed' == $post->ping_status )
Note: See TracChangeset for help on using the changeset viewer.