mirror of
https://github.com/friendica/friendica
synced 2025-04-27 01:10:14 +00:00
Merge branch 'develop' into reuse
This commit is contained in:
commit
dc2d894a26
10 changed files with 1133 additions and 2307 deletions
|
@ -245,6 +245,17 @@ class Contact
|
|||
return DBA::update('contact', $fields, $condition, $old_fields);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $id Contact ID
|
||||
* @param array $fields Array of selected fields, empty for all
|
||||
* @return array|boolean Contact record if it exists, false otherwise
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function getAccountById(int $id, array $fields = [])
|
||||
{
|
||||
return DBA::selectFirst('account-user-view', $fields, ['id' => $id]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer $id Contact ID
|
||||
* @param array $fields Array of selected fields, empty for all
|
||||
|
@ -2361,7 +2372,8 @@ class Contact
|
|||
|
||||
if ($default_avatar && Proxy::isLocalImage($avatar)) {
|
||||
$fields = [
|
||||
'avatar' => $avatar, 'avatar-date' => DateTimeFormat::utcNow(),
|
||||
'avatar' => $avatar,
|
||||
'avatar-date' => DateTimeFormat::utcNow(),
|
||||
'photo' => $avatar,
|
||||
'thumb' => self::getDefaultAvatar($contact, Proxy::SIZE_THUMB),
|
||||
'micro' => self::getDefaultAvatar($contact, Proxy::SIZE_MICRO)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue