]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/PortableContact.php
Merge pull request #5072 from Alkarex/ru-plural-intval-bug
[friendica.git] / src / Protocol / PortableContact.php
index d737f4d5afeb6ed4076510a9442b18cf1cace549..f824be40f0e8065c796035d3976f7fbec041c982 100644 (file)
@@ -522,7 +522,12 @@ class PortableContact
                        }
                }
 
-               $fields = ['updated' => $last_updated, 'last_contact' => DateTimeFormat::utcNow()];
+               $fields = ['last_contact' => DateTimeFormat::utcNow()];
+
+               if (!empty($last_updated)) {
+                       $fields['updated'] = $last_updated;
+               }
+
                dba::update('gcontact', $fields, ['nurl' => normalise_link($profile)]);
 
                if (($gcontacts[0]["generation"] == 0)) {
@@ -1427,7 +1432,7 @@ class PortableContact
                        }
 
                        foreach ($tags as $tag) {
-                               dba::insert('gserver-tag', ['gserver-id' => $gserver['id'], 'tag' => $tag]);
+                               dba::insert('gserver-tag', ['gserver-id' => $gserver['id'], 'tag' => $tag], true);
                        }
                }