You are here

function _xrds_element_end in Drupal 6

1 string reference to '_xrds_element_end'
xrds_parse in modules/openid/xrds.inc
Main entry point for parsing XRDS documents

File

modules/openid/xrds.inc, line 49

Code

function _xrds_element_end(&$parser, $name) {
  global $xrds_open_elements, $xrds_services, $xrds_current_service;
  $name = _xrds_strip_namespace($name);
  if ($name == 'SERVICE') {
    if (in_array(OPENID_NS_2_0 . '/signon', $xrds_current_service['types']) || in_array(OPENID_NS_2_0 . '/server', $xrds_current_service['types'])) {
      $xrds_current_service['version'] = 2;
    }
    elseif (in_array(OPENID_NS_1_1, $xrds_current_service['types']) || in_array(OPENID_NS_1_0, $xrds_current_service['types'])) {
      $xrds_current_service['version'] = 1;
    }
    if (!empty($xrds_current_service['version'])) {
      $xrds_services[] = $xrds_current_service;
    }
    $xrds_current_service = array();
  }
  array_pop($xrds_open_elements);
}