while ($delivery = DBA::fetch($deliveries)) {
$id = $delivery['iid'];
unset($delivery['iid']);
- DBA::insert('post-delivery-data', $delivery);
+ DBA::insert('post-delivery-data', $delivery, true);
++$rows;
}
DBA::close($deliveries);
}
// uri-id isn't present for follow entry pseudo-items
- foreach (Tag::getByURIId($item['uri-id'] ?? 0) as $tag) {
+ $tags = Tag::getByURIId($item['uri-id'] ?? 0);
+ foreach ($tags as $tag) {
$mentioned[$tag['url']] = $tag['url'];
}
XML::addElement($doc, $entry, "mastodon:scope", "public");
}
- if (count($tags)) {
- foreach ($tags as $tag) {
- if ($tag['type'] == Tag::HASHTAG) {
- XML::addElement($doc, $entry, "category", "", ["term" => $tag['name']]);
- }
+ foreach ($tags as $tag) {
+ if ($tag['type'] == Tag::HASHTAG) {
+ XML::addElement($doc, $entry, "category", "", ["term" => $tag['name']]);
}
}