-- ------------------------------------------
-- Friendica 2023.03-rc (Giant Rhubarb)
--- DB_UPDATE_VERSION 1517
+-- DB_UPDATE_VERSION 1518
-- ------------------------------------------
`apcontact`.`statuses_count` AS `ap-statuses_count`,
`gserver`.`site_name` AS `site_name`,
`gserver`.`platform` AS `platform`,
- `gserver`.`version` AS `version`
+ `gserver`.`version` AS `version`,
+ `gserver`.`blocked` AS `server-blocked`,
+ `gserver`.`failed` AS `server-failed`
FROM `contact`
LEFT JOIN `item-uri` ON `item-uri`.`id` = `contact`.`uri-id`
LEFT JOIN `apcontact` ON `apcontact`.`uri-id` = `contact`.`uri-id`
`apcontact`.`statuses_count` AS `ap-statuses_count`,
`gserver`.`site_name` AS `site_name`,
`gserver`.`platform` AS `platform`,
- `gserver`.`version` AS `version`
+ `gserver`.`version` AS `version`,
+ `gserver`.`blocked` AS `server-blocked`,
+ `gserver`.`failed` AS `server-failed`
FROM `contact` AS `ucontact`
INNER JOIN `contact` ON `contact`.`uri-id` = `ucontact`.`uri-id` AND `contact`.`uid` = 0
LEFT JOIN `item-uri` ON `item-uri`.`id` = `ucontact`.`uri-id`
$networks[] = Protocol::OSTATUS;
}
- $condition = ['network' => $networks, 'failed' => false, 'deleted' => false, 'uid' => $uid];
+ $condition = [
+ 'network' => $networks,
+ 'server-failed' => false,
+ 'server-blocked' => false,
+ 'failed' => false,
+ 'deleted' => false,
+ 'uid' => $uid
+ ];
if ($uid == 0) {
$condition['blocked'] = false;
["(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]);
- return self::selectToArray([], $condition, $params);
+ return DBA::selectToArray('account-user-view', [], $condition, $params);
}
/**
use Friendica\Database\DBA;
if (!defined('DB_UPDATE_VERSION')) {
- define('DB_UPDATE_VERSION', 1517);
+ define('DB_UPDATE_VERSION', 1518);
}
return [
"site_name" => ["gserver", "site_name"],
"platform" => ["gserver", "platform"],
"version" => ["gserver", "version"],
+ "server-blocked" => ["gserver", "blocked"],
+ "server-failed" => ["gserver", "failed"],
],
"query" => "FROM `contact`
LEFT JOIN `item-uri` ON `item-uri`.`id` = `contact`.`uri-id`
"site_name" => ["gserver", "site_name"],
"platform" => ["gserver", "platform"],
"version" => ["gserver", "version"],
+ "server-blocked" => ["gserver", "blocked"],
+ "server-failed" => ["gserver", "failed"],
],
"query" => "FROM `contact` AS `ucontact`
INNER JOIN `contact` ON `contact`.`uri-id` = `ucontact`.`uri-id` AND `contact`.`uid` = 0