]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
services() returns an array
authorEvan Prodromou <evan@prodromou.name>
Mon, 2 Jun 2008 18:17:59 +0000 (14:17 -0400)
committerEvan Prodromou <evan@prodromou.name>
Mon, 2 Jun 2008 18:17:59 +0000 (14:17 -0400)
darcs-hash:20080602181759-84dde-97355611da9635d40f41eb9324731cfaa3c584e0.gz

actions/remotesubscribe.php

index f454a140078eb51150278f5b04ea071d653147d1..f3893e43fcb993f29c90e38b7e0f187acb0d8b61 100644 (file)
@@ -131,13 +131,15 @@ class RemotesubscribeAction extends Action {
                
                common_debug('remotesubscribe.php - looking for oauth discovery service');
                
-               $oauth_service = $xrds->services(omb_service_filter(OAUTH_DISCOVERY));
+               $oauth_services = $xrds->services(omb_service_filter(OAUTH_DISCOVERY));
                
-               if (!$oauth_service) {
+               if (!$oauth_services) {
                        common_debug('remotesubscribe.php - failed to find oauth discovery service');
                        return NULL;
                }
 
+               $oauth_service = $oauth_services[0];
+               
                common_debug('remotesubscribe.php - looking for oauth discovery XRD');
                
                $xrd = $this->getXRD($oauth_service, $xrds);
@@ -156,13 +158,15 @@ class RemotesubscribeAction extends Action {
 
                common_debug('remotesubscribe.php - looking for OMB discovery service');
                
-               $omb_service = $xrds->services(omb_service_filter(OMB_NAMESPACE));
+               $omb_services = $xrds->services(omb_service_filter(OMB_NAMESPACE));
 
-               if (!$omb_service) {
+               if (!$omb_services) {
                        common_debug('remotesubscribe.php - failed to find OMB discovery service');
                        return NULL;
                }
 
+               $omb_service = $omb_services[0];
+               
                common_debug('remotesubscribe.php - looking for OMB discovery XRD');
                
                $xrd = $this->getXRD($omb_service, $xrds);