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
This commit is contained in:
michelvaldrighi 2004-09-17 08:39:12 +00:00
parent df9a953c1d
commit 226cf46cb2
1 changed files with 2 additions and 3 deletions

View File

@ -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);
}
}