use Friendica\Content\Widget;
use Friendica\Core\ACL;
use Friendica\Core\Addon;
+use Friendica\Database\DBA;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\Item;
if ($conv_id) {
// In multi threaded posts the conv_id is not the parent of the whole thread
- $parent_item = dba::selectFirst('item', ['parent'], ['id' => $conv_id]);
+ $parent_item = Item::selectFirst(['parent'], ['id' => $conv_id]);
if (DBM::is_result($parent_item)) {
$conv_id = $parent_item['parent'];
}
$condition = ["`parent` = ?", $conv_id];
$params = ['order' => ['author-name' => true]];
- $authors = Item::select(local_user(), ['author-link'], $condition, $params);
+ $authors = Item::selectForUser(local_user(), ['author-link'], $condition, $params);
$item_authors = [];
- while ($author = dba::fetch($authors)) {
+ while ($author = Item::fetch($authors)) {
$item_authors[$author['author-link']] = $author['author-link'];
}
- dba::close($authors);
+ DBA::close($authors);
foreach ($item_authors as $author) {
if (in_array($author, $known_contacts)) {