* wrong param order to in_array
* in getContent() if "type" isn't set, assume text (per atom spec)
This commit is contained in:
parent
9e9ab23e1f
commit
a9dabbe77e
@ -457,7 +457,7 @@ class ActivityUtils
|
|||||||
|
|
||||||
// slavishly following http://atompub.org/rfc4287.html#rfc.section.4.1.3.3
|
// slavishly following http://atompub.org/rfc4287.html#rfc.section.4.1.3.3
|
||||||
|
|
||||||
if ($type == 'text') {
|
if (empty($type) || $type == 'text') {
|
||||||
return $contentEl->textContent;
|
return $contentEl->textContent;
|
||||||
} else if ($type == 'html') {
|
} else if ($type == 'html') {
|
||||||
$text = $contentEl->textContent;
|
$text = $contentEl->textContent;
|
||||||
@ -476,7 +476,7 @@ class ActivityUtils
|
|||||||
$text .= $doc->saveXML($child);
|
$text .= $doc->saveXML($child);
|
||||||
}
|
}
|
||||||
return trim($text);
|
return trim($text);
|
||||||
} else if (in_array(array('text/xml', 'application/xml'), $type) ||
|
} else if (in_array($type, array('text/xml', 'application/xml')) ||
|
||||||
preg_match('#(+|/)xml$#', $type)) {
|
preg_match('#(+|/)xml$#', $type)) {
|
||||||
throw new ClientException(_("Can't handle embedded XML content yet."));
|
throw new ClientException(_("Can't handle embedded XML content yet."));
|
||||||
} else if (strncasecmp($type, 'text/', 5)) {
|
} else if (strncasecmp($type, 'text/', 5)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user