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:
parent
df9a953c1d
commit
226cf46cb2
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue