This commit is contained in:
Peter Molnar 2016-04-28 09:08:15 +00:00
parent fcf6476f9f
commit ca4dd7e5a9
2 changed files with 10 additions and 10 deletions

View file

@ -319,6 +319,9 @@ class WP_Webmention_Again_Receiver extends WP_Webmention_Again {
$post = get_post ( $post_id ); $post = get_post ( $post_id );
// increment retries
static::queue_inc ( $received->id );
if ( ! static::is_post( $post ) ) { if ( ! static::is_post( $post ) ) {
static::debug( " no post found for this mention, try again later, who knows?", 6); static::debug( " no post found for this mention, try again later, who knows?", 6);
//static::queue_del ( $received->id ); //static::queue_del ( $received->id );
@ -332,9 +335,6 @@ class WP_Webmention_Again_Receiver extends WP_Webmention_Again {
continue; continue;
} }
// increment retries
static::queue_inc ( $received->id );
// validate target // validate target
$remote = static::try_receive_remote( $post_id, $received->source, $received->target ); $remote = static::try_receive_remote( $post_id, $received->source, $received->target );

View file

@ -143,7 +143,7 @@ class WP_Webmention_Again_Sender extends WP_Webmention_Again {
$urls[ $k ] = strtolower( $url ); $urls[ $k ] = strtolower( $url );
// remove all already pinged urls // remove all already pinged urls
$pung = get_post_meta( $post->ID, static::pung, false ); //$pung = get_post_meta( $post->ID, static::pung, false );
/* /*
// retrofill pung from pingback field, temporary // retrofill pung from pingback field, temporary
@ -158,7 +158,7 @@ class WP_Webmention_Again_Sender extends WP_Webmention_Again {
} }
*/ */
$urls = array_diff ( $urls, $pung ); //$urls = array_diff ( $urls, $pung );
foreach ( $urls as $target ) { foreach ( $urls as $target ) {
@ -223,11 +223,11 @@ class WP_Webmention_Again_Sender extends WP_Webmention_Again {
else { else {
static::debug( " sending succeeded!", 5); static::debug( " sending succeeded!", 5);
$post_types = get_post_types( '', 'names' ); //$post_types = get_post_types( '', 'names' );
if ( in_array( $send->object_type, $post_types ) && 0 != $send->object_id ) { //if ( in_array( $send->object_type, $post_types ) && 0 != $send->object_id ) {
add_post_meta ( $send->object_id, static::pung, $send->target, false ); //add_post_meta ( $send->object_id, static::pung, $send->target, false );
//add_ping( $send->object_id, $send->target ); //add_ping( $send->object_id, $send->target );
} //}
static::queue_done ( $send->id, $s ); static::queue_done ( $send->id, $s );
} }
@ -285,7 +285,7 @@ class WP_Webmention_Again_Sender extends WP_Webmention_Again {
} }
if ( 200 <= $response['response']['code'] && 300 > $response['response']['code'] ) { if ( 200 <= $response['response']['code'] && 300 > $response['response']['code'] ) {
static::debug( "sending succeeded: ${$response['response']['code']}, message: {$response['response']['message']}", 5); static::debug( "sending succeeded: {$response['response']['code']}, message: {$response['response']['message']}", 5);
return true; return true;
} }
else { else {