From 4a86823d064e13446733f86218bbe0f49dea7714 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 24 Apr 2009 13:31:03 -0400 Subject: check for existence of xmlrpc extension in LinkbackPlugin --- plugins/LinkbackPlugin.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'plugins/LinkbackPlugin.php') diff --git a/plugins/LinkbackPlugin.php b/plugins/LinkbackPlugin.php index 881ead99e..93a0294c4 100644 --- a/plugins/LinkbackPlugin.php +++ b/plugins/LinkbackPlugin.php @@ -121,6 +121,12 @@ class LinkbackPlugin extends Plugin { $args = array($this->notice->uri, $url); + if (!extension_loaded('xmlrpc')) { + if (!dl('xmlrpc.so')) { + common_log(LOG_ERR, "Can't pingback; xmlrpc extension not available."); + } + } + $request = xmlrpc_encode_request('pingback.ping', $args); $context = stream_context_create(array('http' => array('method' => "POST", 'header' => @@ -141,7 +147,7 @@ class LinkbackPlugin extends Plugin } // Largely cadged from trackback_cls.php by - // Ran Aroussi , GPL2 + // Ran Aroussi , GPL2 or any later version // http://phptrackback.sourceforge.net/ function getTrackback($text, $url) -- cgit v1.2.3-54-g00ecf