summaryrefslogtreecommitdiff
path: root/plugins/OStatus/lib/xrd.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-03-01 21:54:53 -0800
committerZach Copley <zach@status.net>2010-03-01 21:54:53 -0800
commit82c9714fca86edcfa3a54274f8fb1caadb355deb (patch)
treed9f33792bb1047b40eaadb720e643cb28a90f265 /plugins/OStatus/lib/xrd.php
parent871b3aa6c00b38e1782949e201e5cbca7fb7a524 (diff)
parent680ace19665f064404ddb4723d9b41ab69c6e1bd (diff)
Merge branch 'testing' of gitorious.org:statusnet/mainline into testing
* 'testing' of gitorious.org:statusnet/mainline: High-priority OStatus fixes: OStatus: support @example.com/path/to/profile mentions as well as @profile@example.com (latter requires webfinger, former doesn't)
Diffstat (limited to 'plugins/OStatus/lib/xrd.php')
-rw-r--r--plugins/OStatus/lib/xrd.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/OStatus/lib/xrd.php b/plugins/OStatus/lib/xrd.php
index 1de065db9..85df26c54 100644
--- a/plugins/OStatus/lib/xrd.php
+++ b/plugins/OStatus/lib/xrd.php
@@ -161,20 +161,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);