- $results = DBA::p("SELECT * FROM `contact`
- WHERE (NOT `unsearchable` OR `nurl` IN (SELECT `nurl` FROM `owner-view` where `publish` OR `net-publish`))
- AND `network` IN (?, ?, ?, ?) AND
- NOT `failed` AND `uid` = ? AND
- (`addr` LIKE ? OR `name` LIKE ? OR `nick` LIKE ?) $extra_sql
- ORDER BY `nurl` DESC LIMIT 1000",
- Protocol::DFRN, Protocol::ACTIVITYPUB, $ostatus, $diaspora, $uid, $search, $search, $search
- );
+ $condition = DBA::mergeConditions($condition,
+ ["(NOT `unsearchable` OR `nurl` IN (SELECT `nurl` FROM `owner-view` where `publish` OR `net-publish`))
+ AND (`addr` LIKE ? OR `name` LIKE ? OR `nick` LIKE ?)", $search, $search, $search]);