self::$conv_list[$conversation] = true;
- $curlResult = DI::httpRequest()->get($conversation, ['accept_content' => 'application/atom+xml, text/html']);
+ $curlResult = DI::httpRequest()->get($conversation, ['accept_content' => ['application/atom+xml', 'text/html']]);
if (!$curlResult->isSuccess() || empty($curlResult->getBody())) {
return;
$xml = '';
- if (stristr($curlResult->getHeader(), 'Content-Type: application/atom+xml')) {
+ if ($curlResult->inHeader('Content-Type') &&
+ in_array('application/atom+xml', $curlResult->getHeader('Content-Type'))) {
$xml = $curlResult->getBody();
}
}
$stored = false;
- $curlResult = DI::httpRequest()->get($related, ['accept_content' => 'application/atom+xml, text/html']);
+ $curlResult = DI::httpRequest()->get($related, ['accept_content' => ['application/atom+xml', 'text/html']]);
if (!$curlResult->isSuccess() || empty($curlResult->getBody())) {
return;
$xml = '';
- if (stristr($curlResult->getHeader(), 'Content-Type: application/atom+xml')) {
+ if ($curlResult->inHeader('Content-Type') &&
+ in_array('application/atom+xml', $curlResult->getHeader('Content-Type'))) {
Logger::log('Directly fetched XML for URI ' . $related_uri, Logger::DEBUG);
$xml = $curlResult->getBody();
}
XML::addElement($doc, $author, "name", $owner["nick"]);
XML::addElement($doc, $author, "email", $owner["addr"]);
if ($show_profile) {
- XML::addElement($doc, $author, "summary", BBCode::convert($owner["about"], false, BBCode::OSTATUS));
+ XML::addElement($doc, $author, "summary", BBCode::convertForUriId($owner['uri-id'], $owner["about"], BBCode::OSTATUS));
}
$attributes = ["rel" => "alternate", "type" => "text/html", "href" => $owner["url"]];
XML::addElement($doc, $author, "poco:preferredUsername", $owner["nick"]);
XML::addElement($doc, $author, "poco:displayName", $owner["name"]);
if ($show_profile) {
- XML::addElement($doc, $author, "poco:note", BBCode::convert($owner["about"], false, BBCode::OSTATUS));
+ XML::addElement($doc, $author, "poco:note", BBCode::convertForUriId($owner['uri-id'], $owner["about"], BBCode::OSTATUS));
if (trim($owner["location"]) != "") {
$element = $doc->createElement("poco:address");