fix assignment of omb stuff

darcs-hash:20080602183314-84dde-1f81609b2eb0d628c0e6dfe5fea7e21d799bdb3d.gz
This commit is contained in:
Evan Prodromou 2008-06-02 14:33:14 -04:00
parent 98437f21f9
commit 38a621dcf8
2 changed files with 4 additions and 1 deletions

View File

@ -223,7 +223,7 @@ class RemotesubscribeAction extends Action {
foreach ($types as $type) { foreach ($types as $type) {
$matches = $xrd->services(omb_service_filter($type)); $matches = $xrd->services(omb_service_filter($type));
if ($matches) { if ($matches) {
$omb[$type] = $services[0]; $omb[$type] = $matches[0];
} else { } else {
# no match for type # no match for type
return false; return false;

View File

@ -86,6 +86,9 @@ function omb_service_uri($service) {
} }
function omb_local_id($service) { function omb_local_id($service) {
if (!$service) {
return NULL;
}
$els = $service->getElements('LocalID'); $els = $service->getElements('LocalID');
return ($els) ? $els[0] : NULL; return ($els) ? $els[0] : NULL;
} }