Some more "q" calls and deprecated logging replaced

This commit is contained in:
Michael 2021-10-03 19:43:49 +00:00
parent 08c24fd4fa
commit b0bf4b4359
3 changed files with 32 additions and 59 deletions

View file

@ -22,6 +22,7 @@
namespace Friendica\Model\Contact;
use Friendica\Database\DBA;
use Friendica\Model\Contact;
/**
* This class provides information about contact groups based on the "group_member" table.
@ -75,20 +76,9 @@ class Group
*/
public static function listUngrouped(int $uid)
{
return q("SELECT *
FROM `contact`
WHERE `uid` = %d
AND NOT `self`
AND NOT `deleted`
AND NOT `blocked`
AND NOT `pending`
AND NOT `failed`
AND `id` NOT IN (
SELECT DISTINCT(`contact-id`)
FROM `group_member`
INNER JOIN `group` ON `group`.`id` = `group_member`.`gid`
WHERE `group`.`uid` = %d
)", intval($uid), intval($uid));
return Contact::selectToArray([], ["`uid` = ? AND NOT `self` AND NOT `deleted` AND NOT `blocked` AND NOT `pending` AND NOT `failed`
AND `id` NOT IN (SELECT DISTINCT(`contact-id`) FROM `group_member` INNER JOIN `group` ON `group`.`id` = `group_member`.`gid`
WHERE `group`.`uid` = ?)", $uid, $uid]);
}
/**