diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-04-24 13:31:03 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-04-24 13:31:03 -0400 |
commit | ecb09fb8646def7f6a7c5fc0fc2d4df6676edd06 (patch) | |
tree | 46b2c82ef9b764a28485482481e4d6ad6bd36a38 /plugins | |
parent | 83ba1b0b5ef10dc1101ba35bcde4710fd13179cc (diff) |
check for existence of xmlrpc extension in LinkbackPlugin
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/LinkbackPlugin.php | 8 |
1 files changed, 7 insertions, 1 deletions
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 <ran@blogish.org>, GPL2 + // Ran Aroussi <ran@blogish.org>, GPL2 or any later version // http://phptrackback.sourceforge.net/ function getTrackback($text, $url) |