]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
fix service discovery (I think)
authorEvan Prodromou <evan@prodromou.name>
Tue, 3 Jun 2008 11:43:17 +0000 (07:43 -0400)
committerEvan Prodromou <evan@prodromou.name>
Tue, 3 Jun 2008 11:43:17 +0000 (07:43 -0400)
darcs-hash:20080603114317-84dde-04fe2734003fa8023708b6dbda6243d9fd15e9d8.gz

actions/remotesubscribe.php
lib/omb.php

index 16c991fe89195ec57b44623261e73902a6f63e5f..964aa45a205288dcb17b8a8a633d2eb02d4435a3 100644 (file)
@@ -131,7 +131,7 @@ class RemotesubscribeAction extends Action {
 
                common_debug('remotesubscribe.php - looking for oauth discovery service');
 
-               $oauth_services = $xrds->services(omb_service_filter(OAUTH_DISCOVERY));
+               $oauth_services = omb_get_services($xrds, OAUTH_DISCOVERY);
 
                if (!$oauth_services) {
                        common_debug('remotesubscribe.php - failed to find oauth discovery service');
@@ -158,7 +158,7 @@ class RemotesubscribeAction extends Action {
 
                common_debug('remotesubscribe.php - looking for OMB discovery service');
 
-               $omb_services = $xrds->services(omb_service_filter(OMB_NAMESPACE));
+               $omb_services = omb_get_services($xrds, OMB_NAMESPACE);
 
                if (!$omb_services) {
                        common_debug('remotesubscribe.php - failed to find OMB discovery service');
@@ -224,7 +224,7 @@ class RemotesubscribeAction extends Action {
 
        function addServices($xrd, $types, &$omb) {
                foreach ($types as $type) {
-                       $matches = $xrd->services(omb_service_filter($type));
+                       $matches = omb_get_services($xrd, $type);
                        common_debug('remotesubscribe.php - ' . count($matches) . ' matches for "'.$type.'"');
                        if ($matches) {
                                foreach ($matches as $match) {
index 9d4a327a92c0c703fee750e19c3520f4551abf1b..c75fb79037ea75c10c0372046e494e2220ddaf58 100644 (file)
@@ -66,6 +66,10 @@ function omb_hmac_sha1() {
        return $hmac_method;
 }
 
+function omb_get_services($xrd, $type) {
+       return $xrd->services(array(omb_service_filter($type)));
+}
+
 function omb_service_filter($type) {
        return create_function('$s', 
                                                   'return omb_match_service($s, \''.$type.'\');');