summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-06-03 06:48:59 -0400
committerEvan Prodromou <evan@prodromou.name>2008-06-03 06:48:59 -0400
commit65736dc402b24e95d97a4b968f9da1b70e2d8a86 (patch)
tree68350bbec920478824158b45e8d12e07b91279c8
parent8b9d675b3008f4f8201f603c05386a002e25d192 (diff)
more debugging, don't reuse variable
darcs-hash:20080603104859-84dde-3ed15e61feb0cef1a1d0d2dc8723951ac41b00d8.gz
-rw-r--r--actions/remotesubscribe.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/actions/remotesubscribe.php b/actions/remotesubscribe.php
index f0d7a4a39..582e1d080 100644
--- a/actions/remotesubscribe.php
+++ b/actions/remotesubscribe.php
@@ -142,16 +142,16 @@ class RemotesubscribeAction extends Action {
common_debug('remotesubscribe.php - looking for oauth discovery XRD');
- $xrd = $this->getXRD($oauth_service, $xrds);
+ $oauth_xrd = $this->getXRD($oauth_service, $xrds);
- if (!$xrd) {
+ if (!$oauth_xrd) {
common_debug('remotesubscribe.php - failed to find oauth discovery XRD');
return NULL;
}
common_debug('remotesubscribe.php - adding OAuth services from XRD');
- if (!$this->addServices($xrd, $oauth_endpoints, $omb)) {
+ if (!$this->addServices($oauth_xrd, $oauth_endpoints, $omb)) {
common_debug('remotesubscribe.php - failed to add OAuth services');
return NULL;
}
@@ -169,16 +169,16 @@ class RemotesubscribeAction extends Action {
common_debug('remotesubscribe.php - looking for OMB discovery XRD');
- $xrd = $this->getXRD($omb_service, $xrds);
+ $omb_xrd = $this->getXRD($omb_service, $xrds);
- if (!$xrd) {
+ if (!$omb_xrd) {
common_debug('remotesubscribe.php - failed to find OMB discovery XRD');
return NULL;
}
common_debug('remotesubscribe.php - adding OMB services from XRD');
- if (!$this->addServices($xrd, $omb_endpoints, $omb)) {
+ if (!$this->addServices($omb_xrd, $omb_endpoints, $omb)) {
common_debug('remotesubscribe.php - failed to add OMB services');
return NULL;
}
@@ -225,7 +225,11 @@ class RemotesubscribeAction extends Action {
function addServices($xrd, $types, &$omb) {
foreach ($types as $type) {
$matches = $xrd->services(omb_service_filter($type));
+ common_debug('remotesubscribe.php - ' . count($matches) . ' matches for "'.$type.'"');
if ($matches) {
+ foreach ($matches as $match) {
+ common_debug('remotesubscribe.php - "' . get_service_uri($match) . '" matches "'.$type.'"');
+ }
$omb[$type] = $matches[0];
} else {
# no match for type