mirror of
https://github.com/friendica/friendica
synced 2025-04-22 07:10:24 +00:00
Don't store the default header in the contact table
This commit is contained in:
parent
618903fef7
commit
bbda69a736
2 changed files with 57 additions and 38 deletions
|
@ -310,17 +310,18 @@ class Photo extends BaseModule
|
|||
}
|
||||
return MPhoto::createPhotoForExternalResource($url, 0, $mimetext);
|
||||
case "header":
|
||||
$contact = Contact::getById($id, ['uid', 'url', 'header']);
|
||||
$fields = ['uid', 'url', 'header', 'network', 'gsid'];
|
||||
$contact = Contact::getById($id, $fields);
|
||||
if (empty($contact)) {
|
||||
return false;
|
||||
}
|
||||
If (($contact['uid'] != 0) && empty($contact['header'])) {
|
||||
$contact = Contact::getByURL($contact['url'], false, ['header']);
|
||||
$contact = Contact::getByURL($contact['url'], false, $fields);
|
||||
}
|
||||
if (!empty($contact['header'])) {
|
||||
$url = $contact['header'];
|
||||
} else {
|
||||
$url = DI::baseUrl() . '/images/blank.png';
|
||||
$url = Contact::getDefaultHeader($contact);
|
||||
}
|
||||
return MPhoto::createPhotoForExternalResource($url);
|
||||
case "banner":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue