Made message signing in Cryptography use SHA512 as the message content for... #1
1 changed files with 3 additions and 2 deletions
|
@ -239,7 +239,7 @@
|
||||||
* @return array An array of ContactRecord instances representing the contacts for the given peer.
|
* @return array An array of ContactRecord instances representing the contacts for the given peer.
|
||||||
* @throws DatabaseOperationException If the database query fails.
|
* @throws DatabaseOperationException If the database query fails.
|
||||||
*/
|
*/
|
||||||
public static function getContacts(string $peerUuid, int $limit = 100, int $page = 1): array
|
public static function getContacts(string $peerUuid, int $limit=100, int $page=1): array
|
||||||
{
|
{
|
||||||
if ($page < 1)
|
if ($page < 1)
|
||||||
{
|
{
|
||||||
|
@ -252,9 +252,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$contacts = [];
|
$contacts = [];
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$statement = Database::getConnection()->prepare("SELECT * FROM contacts WHERE peer_uuid = :peer ORDER BY created DESC LIMIT :limit OFFSET :offset");
|
$statement = Database::getConnection()->prepare("SELECT * FROM contacts WHERE peer_uuid=:peer ORDER BY created DESC LIMIT :limit OFFSET :offset");
|
||||||
$offset = ($page - 1) * $limit;
|
$offset = ($page - 1) * $limit;
|
||||||
$statement->bindParam(':peer', $peerUuid);
|
$statement->bindParam(':peer', $peerUuid);
|
||||||
$statement->bindParam(':limit', $limit, PDO::PARAM_INT);
|
$statement->bindParam(':limit', $limit, PDO::PARAM_INT);
|
||||||
|
|
Loading…
Add table
Reference in a new issue