From afa0ffeae3c78331ab44939d01fd4ab1e9320e62 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Mon, 22 Dec 2003 03:26:31 +0000 Subject: [PATCH] Update sending pingbacks to use new URL structure. Need to update to receive like that. git-svn-id: https://develop.svn.wordpress.org/trunk@638 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 9af5ffb8cf..8e507d9962 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1037,7 +1037,7 @@ function pingback($content, $post_ID) { // Step 1 // Parsing the post, external links (if any) are stored in the $post_links array - // This regexp comes straigth from phpfreaks.com + // This regexp comes straight from phpfreaks.com // http://www.phpfreaks.com/quickcode/Extract_All_URLs_on_a_Page/15.php preg_match_all("{\b http : [$any] +? (?= [$punc] * [^$any] | $)}x", $content, $post_links_temp); @@ -1089,7 +1089,7 @@ function pingback($content, $post_ID) { } // Send the GET request - $request = "GET $path HTTP/1.1\r\nHost: $host\r\nUser-Agent: b2/$wp_version PHP/" . phpversion() . "\r\n\r\n"; + $request = "GET $path HTTP/1.1\r\nHost: $host\r\nUser-Agent: WordPress/$wp_version PHP/" . phpversion() . "\r\n\r\n"; ob_end_flush(); fputs($fp, $request); @@ -1157,7 +1157,7 @@ function pingback($content, $post_ID) { $method = 'pingback.ping'; debug_fwrite($log, 'Page Linked To: '.$pagelinkedto."\n"); debug_fwrite($log, 'Page Linked From: '); - $pagelinkedfrom = $siteurl.'/'.$blogfilename.'?p='.$post_ID.'&c=1'; + $pagelinkedfrom = get_permalink($post_ID); debug_fwrite($log, $pagelinkedfrom."\n"); $client = new xmlrpc_client($path, $host, 80);