From 226cf46cb2fb0abdd2b6e1316fdab3553933219b Mon Sep 17 00:00:00 2001 From: michelvaldrighi Date: Fri, 17 Sep 2004 08:39:12 +0000 Subject: [PATCH] letting IXR take care of URI parsing, while leaving the old way to call weblog_ping possible git-svn-id: http://svn.automattic.com/wordpress/trunk@1676 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 41a7b4774..49033e263 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -493,7 +493,7 @@ function weblog_ping($server = '', $path = '') { include_once (ABSPATH . WPINC . '/class-IXR.php'); // using a timeout of 3 seconds should be enough to cover slow servers - $client = new IXR_Client($server, (($path == '') ? false : $path)); + $client = new IXR_Client($server, ((!strlen(trim($path)) || ('/' == $path)) ? false : $path)); $client->timeout = 3; $client->useragent .= ' / WordPress '.$wp_version; @@ -510,8 +510,7 @@ function generic_ping($post_id = 0) { if ('' != $services) { $services = explode("\n", $services); foreach ($services as $service) { - $uri = parse_url($service); - weblog_ping($uri['host'], $uri['path']); + weblog_ping($service); } }