- if ($global) {
- Logger::log("Start global query", Logger::DEBUG);
- $contacts = q("SELECT * FROM `gcontact` WHERE `updated` > '%s' AND NOT `hide` AND `network` IN ('%s', '%s', '%s') AND `updated` > `last_failure`
- ORDER BY `updated` DESC LIMIT %d, %d",
- DBA::escape($update_limit),
- DBA::escape(Protocol::DFRN),
- DBA::escape(Protocol::DIASPORA),
- DBA::escape(Protocol::OSTATUS),
- intval($startIndex),
- intval($itemsPerPage)
- );
- } elseif ($system_mode) {
- Logger::log("Start system mode query", Logger::DEBUG);
- $contacts = DBA::selectToArray('owner-view', [], ['net-publish' => true], ['limit' => [$startIndex, $itemsPerPage]]);
- } else {
- Logger::log("Start query for user " . $user['nickname'], Logger::DEBUG);
- $contacts = q("SELECT * FROM `contact` WHERE `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `hidden` = 0 AND `archive` = 0
- AND NOT `failed`
- AND `network` IN ('%s', '%s', '%s', '%s') $sql_extra LIMIT %d, %d",
- intval($user['uid']),
- DBA::escape(Protocol::DFRN),
- DBA::escape(Protocol::DIASPORA),
- DBA::escape(Protocol::OSTATUS),
- DBA::escape(Protocol::STATUSNET),
- intval($startIndex),
- intval($itemsPerPage)
- );
- }
- Logger::log("Query done", Logger::DEBUG);
+ Logger::info("Start system mode query");
+ $contacts = DBA::selectToArray('owner-view', [], ['net-publish' => true], ['limit' => [$startIndex, $itemsPerPage]]);
+
+ Logger::info("Query done");