]> git.mxchange.org Git - friendica-addons.git/commitdiff
Assigns values in a single array
authorMichael <heluecht@pirati.ca>
Thu, 7 Oct 2021 18:55:49 +0000 (18:55 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 7 Oct 2021 18:55:49 +0000 (18:55 +0000)
statusnet/statusnet.php

index 036848493de66c35f349e980d20f20169573edab..e474264ec37d4870dffa835b1dca0cbd59039eea 100644 (file)
@@ -937,27 +937,28 @@ function statusnet_fetch_contact($uid, $contact, $create_user)
        }
 
        if (!DBA::isResult($contact_record)) {
-               // create contact record
-               $fields['uid'] = $uid;
-               $fields['created'] = DateTimeFormat::utcNow();
-               $fields['url'] = $contact->statusnet_profile_url;
-               $fields['nurl'] = Strings::normaliseLink($contact->statusnet_profile_url);
-               $fields['addr'] = statusnet_address($contact);
-               $fields['alias'] = Strings::normaliseLink($contact->statusnet_profile_url);
-               $fields['notify'] = '';
-               $fields['poll'] = '';
-               $fields['name'] = $contact->name;
-               $fields['nick'] = $contact->screen_name;
-               $fields['photo'] = $contact->profile_image_url;
-               $fields['network'] = Protocol::STATUSNET;
-               $fields['rel'] = Contact::FRIEND;
-               $fields['priority'] = 1;
-               $fields['location'] = $contact->location;
-               $fields['about'] = $contact->description;
-               $fields['writable'] = true;
-               $fields['blocked'] = false;
-               $fields['readonly'] = false;
-               $fields['pending'] = false;
+               $fields = [
+                       'uid'      => $uid,
+                       'created'  => DateTimeFormat::utcNow(),
+                       'url'      => $contact->statusnet_profile_url,
+                       'nurl'     => Strings::normaliseLink($contact->statusnet_profile_url),
+                       'addr'     => statusnet_address($contact),
+                       'alias'    => Strings::normaliseLink($contact->statusnet_profile_url),
+                       'notify'   => '',
+                       'poll'     => '',
+                       'name'     => $contact->name,
+                       'nick'     => $contact->screen_name,
+                       'photo'    => $contact->profile_image_url,
+                       'network'  => Protocol::STATUSNET,
+                       'rel'      => Contact::FRIEND,
+                       'priority' => 1,
+                       'location' => $contact->location,
+                       'about'    => $contact->description,
+                       'writable' => true,
+                       'blocked'  => false,
+                       'readonly' => false,
+                       'pending'  => false,
+               ];
 
                if (!Contact::insert($fields)) {
                        return false;