From: garvinhicking Date: Tue, 14 Mar 2006 11:21:09 +0000 (+0000) Subject: check xmlrpc existence X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9e2019a1064592ebf68b378fc5e16d5ec4800ca5;p=s9y.git check xmlrpc existence --- diff --git a/plugins/serendipity_event_weblogping/serendipity_event_weblogping.php b/plugins/serendipity_event_weblogping/serendipity_event_weblogping.php index b5958b6..73dc478 100644 --- a/plugins/serendipity_event_weblogping/serendipity_event_weblogping.php +++ b/plugins/serendipity_event_weblogping/serendipity_event_weblogping.php @@ -22,7 +22,7 @@ class serendipity_event_weblogping extends serendipity_event $propbag->add('description', PLUGIN_EVENT_WEBLOGPING_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '1.02'); + $propbag->add('version', '1.03'); $propbag->add('requirements', array( 'serendipity' => '0.8', 'smarty' => '2.6.7', @@ -156,7 +156,7 @@ class serendipity_event_weblogping extends serendipity_event } } foreach ($this->services as $index => $service) { - if (isset($serendipity['POST']['announce_entries_' . $service['name']])) { + if (isset($serendipity['POST']['announce_entries_' . $service['name']]) || (defined('SERENDIPITY_IS_XMLRPC') && serendipity_db_bool($this->get_config($service['name']))) { printf(PLUGIN_EVENT_WEBLOGPING_SENDINGPING . '...', $service['host']); flush(); @@ -213,9 +213,13 @@ class serendipity_event_weblogping extends serendipity_event $http_response = $req->getResponseBody(); $xmlrpc_result = $message->parseResponse($http_response); if ($xmlrpc_result->faultCode()) { - echo sprintf(PLUGIN_EVENT_WEBLOGPING_SEND_FAILURE . "
", htmlspecialchars($xmlrpc_result->faultString())); + $out = sprintf(PLUGIN_EVENT_WEBLOGPING_SEND_FAILURE . "
", htmlspecialchars($xmlrpc_result->faultString())); } else { - echo PLUGIN_EVENT_WEBLOGPING_SEND_SUCCESS . "
"; + $out = PLUGIN_EVENT_WEBLOGPING_SEND_SUCCESS . "
"; + } + + if (!defined('SERENDIPITY_IS_XMLRPC')) { + echo $out; } } }