X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fxrd.php;h=43cb2ec73c8eac1868dc3bb2e01291fb50b813e5;hb=956b3ef4d18c091cb070708fd941df27b5c0264d;hp=9c6d9f3ab70044a4d8573ff713c38778fca51f88;hpb=d8d9edfc990a20f67421e40a7d3055a58697a002;p=quix0rs-gnu-social.git diff --git a/lib/xrd.php b/lib/xrd.php index 9c6d9f3ab7..43cb2ec73c 100644 --- a/lib/xrd.php +++ b/lib/xrd.php @@ -26,7 +26,6 @@ * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @link http://status.net/ */ - class XRD { const XML_NS = 'http://www.w3.org/2000/xmlns/'; @@ -61,12 +60,12 @@ class XRD if (!$ok) { // TRANS: Exception. - throw new Exception(_m('Invalid XML.')); + throw new Exception(_('Invalid XML.')); } $xrd_element = $dom->getElementsByTagName('XRD')->item(0); if (!$xrd_element) { // TRANS: Exception. - throw new Exception(_m('Invalid XML, missing XRD root.')); + throw new Exception(_('Invalid XML, missing XRD root.')); } // Check for host-meta host @@ -173,6 +172,13 @@ class XRD switch($node->tagName) { case 'Title': $link['title'][] = $node->nodeValue; + break; + case 'Property': + $link['property'][] = array('type' => $node->getAttribute('type'), + 'value' => $node->nodeValue); + break; + default: + common_log(LOG_NOTICE, "Unexpected tag name {$node->tagName} found in XRD file."); } } }