From 52a197b235c4347e0fe6b14609098c0a0e444319 Mon Sep 17 00:00:00 2001 From: CiaranG Date: Tue, 8 Sep 2009 13:25:59 +0100 Subject: Linkback Plugin: check result properly so failures are not reported as a success in the log. Also logs (debug only) when an attempt is being made --- plugins/LinkbackPlugin.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'plugins') diff --git a/plugins/LinkbackPlugin.php b/plugins/LinkbackPlugin.php index c49f70de0..60f7a60c7 100644 --- a/plugins/LinkbackPlugin.php +++ b/plugins/LinkbackPlugin.php @@ -75,6 +75,8 @@ class LinkbackPlugin extends Plugin function linkbackUrl($url) { + common_log(LOG_DEBUG,"Attempting linkback for " . $url); + $orig = $url; $url = htmlspecialchars_decode($orig); $scheme = parse_url($url, PHP_URL_SCHEME); @@ -134,15 +136,20 @@ class LinkbackPlugin extends Plugin "User-Agent: " . $this->userAgent(), 'content' => $request))); $file = file_get_contents($endpoint, false, $context); - $response = xmlrpc_decode($file); - if (xmlrpc_is_fault($response)) { + if (!$file) { common_log(LOG_WARNING, + "Pingback request failed for '$url' ($endpoint)"); + } else { + $response = xmlrpc_decode($file); + if (xmlrpc_is_fault($response)) { + common_log(LOG_WARNING, "Pingback error for '$url' ($endpoint): ". "$response[faultString] ($response[faultCode])"); - } else { - common_log(LOG_INFO, + } else { + common_log(LOG_INFO, "Pingback success for '$url' ($endpoint): ". "'$response'"); + } } } -- cgit v1.2.3-54-g00ecf From 99c74f2cc4b2a2c62d4188c862fec96caec44c06 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 15 Sep 2009 21:22:15 -0400 Subject: statusize OpenID plugin --- plugins/OpenID/OpenIDPlugin.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'plugins') diff --git a/plugins/OpenID/OpenIDPlugin.php b/plugins/OpenID/OpenIDPlugin.php index eb450fc5e..91bddf381 100644 --- a/plugins/OpenID/OpenIDPlugin.php +++ b/plugins/OpenID/OpenIDPlugin.php @@ -1,6 +1,6 @@ . * * @category Plugin - * @package Laconica - * @author Evan Prodromou - * @copyright 2009 Control Yourself, Inc. + * @package StatusNet + * @author Evan Prodromou + * @copyright 2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET')) { exit(1); } @@ -36,10 +36,10 @@ if (!defined('LACONICA')) { * and identity system. * * @category Plugin - * @package Laconica - * @author Evan Prodromou + * @package StatusNet + * @author Evan Prodromou * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ * @link http://openid.net/ */ -- cgit v1.2.3-54-g00ecf