merging fixes by Mark Ghosh for service pings

git-svn-id: http://svn.automattic.com/wordpress/trunk@1279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
michelvaldrighi 2004-05-14 17:31:54 +00:00
parent 620accf191
commit c9ad4c9437
2 changed files with 45 additions and 23 deletions

View File

@ -776,6 +776,26 @@ class xmlrpcval {
function xmlrpcval($val=-1, $type="") {
global $xmlrpcTypes;
// but this doesn't work, so we redefine it. WEIRD BUG ALERT
$xmlrpcI4="i4";
$xmlrpcInt="int";
$xmlrpcBoolean="boolean";
$xmlrpcDouble="double";
$xmlrpcString="string";
$xmlrpcDateTime="dateTime.iso8601";
$xmlrpcBase64="base64";
$xmlrpcArray="array";
$xmlrpcStruct="struct";
$xmlrpcTypes=array($xmlrpcI4 => 1,
$xmlrpcInt => 1,
$xmlrpcBoolean => 1,
$xmlrpcString => 1,
$xmlrpcDouble => 1,
$xmlrpcDateTime => 1,
$xmlrpcBase64 => 1,
$xmlrpcArray => 2,
$xmlrpcStruct => 3);
// print_r($xmlrpcTypes);
$this->me=array();
$this->mytype=0;
if ($val!=-1 || $type!="") {
@ -1058,7 +1078,7 @@ function iso8601_decode($idate, $utc=0) {
****************************************************************/
if (!function_exists('phpxmlrpc_decode')) {
function phpxmlrpc_decode($xmlrpc_val) {
$kind = $xmlrpc_val->kindOf();
$kind = @$xmlrpc_val->kindOf();
if($kind == "scalar") {
return $xmlrpc_val->scalarval();

View File

@ -503,6 +503,7 @@ function weblog_ping($server = '', $path = '') {
$c = new xmlrpc_client($path, $server, 80);
$r = $c->send($f);
if ('0' != $r) {
if ($debug) {
echo "<h3>Response Object Dump:</h3>
<pre>\n";
@ -526,6 +527,7 @@ function weblog_ping($server = '', $path = '') {
if ($debug) print '<blockquote>' . $result['message'] . '</blockquote>';
}
}
function generic_ping($post_id = 0) {
$services = get_settings('ping_sites');