mirror of
https://github.com/friendica/friendica
synced 2025-04-27 15:10:11 +00:00
Several more warnings ... (#5340)
* Some more warnings removed * Even more warnings ... * Will it ever end? ;-) * Avoid warning in dbstructure * Origin and OStatus ... * There are more warnings solved ... yeah! * And again ... * We are not done yet * And more ... * And some new places ... * And more in the feeds * Avoid some more * And some backend stuff * Notifications cleared * Some more stuff * and again ... * It's getting fewer ... * Some warnings had been hidden in the notifications * Fix the fix * And another missing one ... * We need the owner here, not the user * Forgotten user * And more ... * And some more warnings disappeared ... * Some more frontend warnings * Some backend warnings removed * Fixed sidebar for "vier" * And more ... * Some more ... * And something for "remote self" * Am I stuck in an endless loop? * Fix: Clear tag and file field on update * Preset page content
This commit is contained in:
parent
32ef5623ab
commit
0360f7197a
48 changed files with 415 additions and 267 deletions
|
@ -475,34 +475,34 @@ class Contact extends BaseObject
|
|||
$profile = $default;
|
||||
}
|
||||
|
||||
if (($profile["photo"] == "") && isset($default["photo"])) {
|
||||
if (empty($profile["photo"]) && isset($default["photo"])) {
|
||||
$profile["photo"] = $default["photo"];
|
||||
}
|
||||
|
||||
if (($profile["name"] == "") && isset($default["name"])) {
|
||||
if (empty($profile["name"]) && isset($default["name"])) {
|
||||
$profile["name"] = $default["name"];
|
||||
}
|
||||
|
||||
if (($profile["network"] == "") && isset($default["network"])) {
|
||||
if (empty($profile["network"]) && isset($default["network"])) {
|
||||
$profile["network"] = $default["network"];
|
||||
}
|
||||
|
||||
if (($profile["thumb"] == "") && isset($profile["photo"])) {
|
||||
if (empty($profile["thumb"]) && isset($profile["photo"])) {
|
||||
$profile["thumb"] = $profile["photo"];
|
||||
}
|
||||
|
||||
if (($profile["micro"] == "") && isset($profile["thumb"])) {
|
||||
if (empty($profile["micro"]) && isset($profile["thumb"])) {
|
||||
$profile["micro"] = $profile["thumb"];
|
||||
}
|
||||
|
||||
if ((($profile["addr"] == "") || ($profile["name"] == "")) && ($profile["gid"] != 0)
|
||||
if ((empty($profile["addr"]) || empty($profile["name"])) && (defaults($profile, "gid", 0) != 0)
|
||||
&& in_array($profile["network"], [NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS])
|
||||
) {
|
||||
Worker::add(PRIORITY_LOW, "UpdateGContact", $profile["gid"]);
|
||||
}
|
||||
|
||||
// Show contact details of Diaspora contacts only if connected
|
||||
if (($profile["cid"] == 0) && ($profile["network"] == NETWORK_DIASPORA)) {
|
||||
if ((defaults($profile, "cid", 0) == 0) && (defaults($profile, "network", "") == NETWORK_DIASPORA)) {
|
||||
$profile["location"] = "";
|
||||
$profile["about"] = "";
|
||||
$profile["gender"] = "";
|
||||
|
@ -596,7 +596,7 @@ class Contact extends BaseObject
|
|||
$uid = local_user();
|
||||
}
|
||||
|
||||
if ($contact['uid'] != $uid) {
|
||||
if (empty($contact['uid']) || ($contact['uid'] != $uid)) {
|
||||
if ($uid == 0) {
|
||||
$profile_link = self::magicLink($contact['url']);
|
||||
$menu = ['profile' => [L10n::t('View Profile'), $profile_link, true]];
|
||||
|
@ -1533,8 +1533,12 @@ class Contact extends BaseObject
|
|||
|
||||
$contact_record = [
|
||||
'id' => dba::lastInsertId(),
|
||||
'network' => NETWORK_OSTATUS
|
||||
'network' => NETWORK_OSTATUS,
|
||||
'name' => $name,
|
||||
'url' => $url,
|
||||
'photo' => $photo
|
||||
];
|
||||
|
||||
Contact::updateAvatar($photo, $importer["uid"], $contact_record["id"], true);
|
||||
|
||||
/// @TODO Encapsulate this into a function/method
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue