$propbag->add('description', PLUGIN_EVENT_WEBLOGPING_DESC);
$propbag->add('stackable', false);
$propbag->add('author', 'Serendipity Team');
- $propbag->add('version', '1.03');
+ $propbag->add('version', '1.05');
$propbag->add('requirements', array(
'serendipity' => '0.8',
'smarty' => '2.6.7',
'backend_insert' => true,
'backend_update' => true,
'backend_publish' => true,
- 'backend_draft' => true
+ 'backend_draft' => true,
+ 'external_plugin' => true
));
$propbag->add('groups', array('BACKEND_EDITOR'));
}
foreach ($this->services as $index => $service) {
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']);
+ if (!defined('SERENDIPITY_IS_XMLRPC') || defined('SERENDIPITY_XMLRPC_VERBOSE')) {
+ printf(PLUGIN_EVENT_WEBLOGPING_SENDINGPING . '...', $service['host']);
+ }
flush();
# XXX append $serendipity['indexFile'] to baseURL?
} else {
$out = PLUGIN_EVENT_WEBLOGPING_SEND_SUCCESS . "<br />";
}
-
- if (!defined('SERENDIPITY_IS_XMLRPC')) {
+
+ if (!defined('SERENDIPITY_IS_XMLRPC') || defined('SERENDIPITY_XMLRPC_VERBOSE')) {
echo $out;
}
}
return true;
break;
+ case 'external_plugin':
+ if ($eventData == 'xmlrpc_ping') {
+ echo "XMLRPC START\n";
+ @define('SERENDIPITY_IS_XMLRPC', true);
+ @define('SERENDIPITY_XMLRPC_VERBOSE', true);
+ $this->event_hook('backend_publish', $bag, $eventData);
+ echo "XMLRPC DONE\n";
+ }
+ return true;
+
case 'frontend_display':
case 'backend_insert':
case 'backend_update':