use DOMDocument;
use DOMElement;
use DOMXPath;
+use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Content\Text\HTML;
use Friendica\Core\Cache\Enum\Duration;
*/
if ($aliaslink != '') {
$contact = DBA::selectFirst('contact', [], [
- "`uid` = ? AND `alias` = ? AND `network` != ? AND `rel` IN (?, ?)",
+ "`uid` = ? AND `alias` = ? AND `rel` IN (?, ?)",
$importer['uid'],
- $aliaslink, Protocol::STATUSNET,
+ $aliaslink,
Contact::SHARING, Contact::FRIEND,
]);
}
}
$contact = DBA::selectFirst('contact', [], [
- "`uid` = ? AND `nurl` IN (?, ?) AND `network` != ? AND `rel` IN (?, ?)",
+ "`uid` = ? AND `nurl` IN (?, ?) AND `rel` IN (?, ?)",
$importer['uid'],
Strings::normaliseLink($author['author-link']),
Strings::normaliseLink($aliaslink),
- Protocol::STATUSNET,
Contact::SHARING,
Contact::FRIEND,
]);
if (!DBA::isResult($contact) && ($addr != '')) {
$contact = DBA::selectFirst('contact', [], [
- "`uid` = ? AND `addr` = ? AND `network` != ? AND `rel` IN (?, ?)",
+ "`uid` = ? AND `addr` = ? AND `rel` IN (?, ?)",
$importer['uid'],
$addr,
- Protocol::STATUSNET,
Contact::SHARING,
Contact::FRIEND,
]);
$attributes = [
'uri' => 'https://friendi.ca',
- 'version' => FRIENDICA_VERSION . '-' . DB_UPDATE_VERSION,
+ 'version' => App::VERSION . '-' . DB_UPDATE_VERSION,
];
- XML::addElement($doc, $root, 'generator', FRIENDICA_PLATFORM, $attributes);
+ XML::addElement($doc, $root, 'generator', App::PLATFORM, $attributes);
XML::addElement($doc, $root, 'id', DI::baseUrl() . '/profile/' . $owner['nick']);
XML::addElement($doc, $root, 'title', $title);
XML::addElement($doc, $root, 'subtitle', sprintf("Updates from %s on %s", $owner['name'], DI::config()->get('config', 'sitename')));
}
}
- foreach (Post\Media::getByURIId($item['uri-id'], [Post\Media::DOCUMENT, Post\Media::TORRENT, Post\Media::UNKNOWN]) as $attachment) {
+ foreach (Post\Media::getByURIId($item['uri-id'], [Post\Media::DOCUMENT, Post\Media::TORRENT]) as $attachment) {
$attributes = ['rel' => 'enclosure',
'href' => $attachment['url'],
'type' => $attachment['mimetype']];
XML::addElement($doc, $entry, 'id', $item['uri']);
XML::addElement($doc, $entry, 'title', html_entity_decode($title, ENT_QUOTES, 'UTF-8'));
- $body = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']);
+ $body = Post\Media::addAttachmentsToBody($item['uri-id'], DI::contentItem()->addSharedPost($item));
$body = self::formatPicturePost($body, $item['uri-id']);
if (!empty($item['title'])) {