]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
check for existence of xmlrpc extension in LinkbackPlugin
authorEvan Prodromou <evan@controlyourself.ca>
Fri, 24 Apr 2009 17:31:03 +0000 (13:31 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Fri, 24 Apr 2009 17:32:57 +0000 (13:32 -0400)
plugins/LinkbackPlugin.php

index 881ead99ec29d091d5a13729b9fa1d3eb8f87076..93a0294c4ca9cbd23cd720c4909089b667494136 100644 (file)
@@ -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)