diff options
author | Brion Vibber <brion@pobox.com> | 2010-03-01 16:36:33 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-03-01 16:43:36 -0800 |
commit | 493b5479c15f0e135054fd6b961e50e690077eda (patch) | |
tree | df7d5077418b4d29e041e8e721edcea604f98e75 /plugins/OStatus/lib/xrd.php | |
parent | 0512151eabf64e88b4648869b3d029800d30668a (diff) |
OStatus: support @example.com/path/to/profile mentions as well as @profile@example.com (latter requires webfinger, former doesn't)
Plus misc warnings/notices cleanup in the submission path.
Diffstat (limited to 'plugins/OStatus/lib/xrd.php')
-rw-r--r-- | plugins/OStatus/lib/xrd.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/OStatus/lib/xrd.php b/plugins/OStatus/lib/xrd.php index 16d27f8eb..48c1c88e1 100644 --- a/plugins/OStatus/lib/xrd.php +++ b/plugins/OStatus/lib/xrd.php @@ -156,20 +156,20 @@ class XRD function saveLink($doc, $link) { $link_element = $doc->createElement('Link'); - if ($link['rel']) { + if (!empty($link['rel'])) { $link_element->setAttribute('rel', $link['rel']); } - if ($link['type']) { + if (!empty($link['type'])) { $link_element->setAttribute('type', $link['type']); } - if ($link['href']) { + if (!empty($link['href'])) { $link_element->setAttribute('href', $link['href']); } - if ($link['template']) { + if (!empty($link['template'])) { $link_element->setAttribute('template', $link['template']); } - if (is_array($link['title'])) { + if (!empty($link['title']) && is_array($link['title'])) { foreach($link['title'] as $title) { $title = $doc->createElement('Title', $title); $link_element->appendChild($title); |