From 1c352e673ec43c27faae59f3222d0c13adfa48e7 Mon Sep 17 00:00:00 2001 From: saxmatt 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: http://svn.automattic.com/wordpress/trunk@638 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 9af5ffb8c..8e507d996 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);